Boost logo

Boost :

Subject: Re: [boost] [multi_index][serialization] save_construct_data not called for multi_index collection
From: joaquin_at_[hidden]
Date: 2009-12-22 02:23:35


joaquin_at_[hidden] escribió:
> Felipe Magno de Almeida escribió:
>
>> Hi,
>>
>> Boost.Serialization has support for non-default classes using
>> save_construct_data and load_construct_data overloads.
>> These are called before serialization to save and load information
>> that's important for the construction of the object.
>> Unfortunately, multi_index doesn't call these functions when
>> serializing, so serialization of non-default-constructible classes is
>> impossible with multi_index.
>>
>
> Hi, seems you spotted a bug here. load_construct_data_adl is actually used
> (see boost/multi_index/detail/archive_constructed.hpp ), but this is not
> the case for save_construct_data_adl, which is also necessary.
>
> I'll fix this.

Can you please check whether

https://svn.boost.org/trac/boost/changeset/58485/

solves your problem? Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk