Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-08-03 18:48:52


a) I've read your post
b) I see your point that the serialization of optional doesn't handle types
without default constructors
c) I agree that it should be fixed.
d) don't like the way you fixed it. I'm sure should work but I don't like
the usage of the heap. For a better way to do this take a look at
collections_load_imp.hpp which adderss this problem in a different context.

Its too late to fixe for 1.33.

Robert Ramey

Jasper, Alexander wrote:
> Hi Jeff, All!
>
> thanks a lot for the reply. I assume the bug fix is in 1.33?
>
> I'm still having issues with boost.optinal and boost.serialize
> working together (in 1.32).
> Is for deserialization of boost::optional<T> T required to have
> default ctor?.
>
> This prevents boost::optional<boost::posix_time::time_period> from
> being serialized. The extraction code fails to compile. I would an
> ugly way around this (please see my last email). Does anybody have
> ideas for better solutions?
>
> I've attached a modified version of #include
> <boost/serialization/optional.hpp> to this email, that contains code
> changes to make to work with types w/o T having a default ctor. But
> I'm really unhappy with that solution and I don't know what I broke
> with this change...
>
> thanks in advance
>
> Alex
>
>> -----Ursprüngliche Nachricht-----
>> Von: boost-users-bounces_at_[hidden]
>> [mailto:boost-users-bounces_at_[hidden]]Im Auftrag von
>> Jeff Garland
>> Gesendet: Freitag, 29. Juli 2005 15:40
>> An: boost-users_at_[hidden]
>> Betreff: Re: [Boost-users] questions concerning optional + date_time
>> +serialize
>>
>>
>> On Fri, 29 Jul 2005 15:21:38 +0200, Jasper, Alexander wrote
>>> ...
>>> Another thing is that I'm unable to serialize not_a_date_time
>>> ptimes. The extractions fails here. I'm using the binary
>> archive. Is
>>> that supported? The documentation of date time only states
>>> compatibility with text and XML archive...
>>
>> There was a recent (jun 21) bug-fix in date-time that was
>> preventing correct
>> serialization of special values -- even with text archives --
>> so it's likely
>> that's what you are seeing. I haven't tried the binary
>> archive, but there's
>> no reason it shouldn't work. I believe you should be able to
>> just pickup the
>> latest version of gregorian/greg_serialize.hpp and
>> posix_time/time_serialize.hpp to try it out.
>>
>> Jeff
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
>
>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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