Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] [archive] Bug serializing vectorsconsecutively
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-08-25 16:15:34


change
oa << this;

to

oa << *this

Paul Eipper wrote:
>> Hi,
>>
>> I've hit what I believe is a bug in boost serialization, at least on
>> binary and text archive modes.
>>
>> If I have two member vectors (of int, for example), and the serialize
>> code is like this:
>>
>> ar & vector1;
>> ar & vector2;
>>
>> I cannot deserialize it back, since boost throws "stream error" if
>> it's a text archive, or "std::length_error" on vector::reserve if
>> it's a binary archive.
>> Attached is an example code.
>>
>> att,
>> --
>> Paul Eipper
>>
>
>
>
>> _______________________________________________
>> 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