|
Boost Users : |
Subject: Re: [Boost-users] Serialization of optional<std::string>
From: Robert Ramey (ramey_at_[hidden])
Date: 2018-02-20 16:56:32
On 2/20/18 1:41 AM, Chardrazle via Boost-users wrote:
> Indeed, and my initial workaround was to force that through:
>
> It may be related to: https://svn.boost.org/trac10/ticket/13108
> (is_default_constructible support.)
>
> Time to start muddying the waters.
> (Note: the binary archives were taken from the latest serialization 'test'
> code area.)
Your on the right track here.
Note that the boost regression tests
http://www.boost.org/development/tests/develop/developer/serialization.html
show serialization of optional passing with all archives - including the
binary one.
So it seems that this is an issue related to portable_binary_archive
which has the status and example not being currently being tested on a
regular basis. In theory, the code in archive implementations should be
totally agnostic to the data type being serialized. Alas, s*** happens.
I would recommend tracing with the debugger trough serialization of
optional<string> in portable binary archive to see how it's different
from serialization in binary or text archive.
I've been wanting to promote portable_binary_archive to "offically
supported" status, but I can't justify spending the time.
Robert Ramey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net