Boost logo

Boost :

Subject: [boost] [multi_index][serialization] save_construct_data not called for multi_index collection
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-12-21 10:48:55


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.

I wanted to patch it so that it becomes possible, but to be honest I'm
a bit lost in the serialization code for multi_index.
collections_save_impl calls
boost::serialization::save_construct_data_adl before serializing each
item in the collection.

I'm using boost 1.38.0, is there anyway to do the same for multi_index?

Thanks in advance,

Felipe Magno de Almeida

Boost list run by bdawes at, gregod at, cpdaniel at, john at