Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-05-16 10:11:29

Neal Becker wrote:
> I want to suggest 2 changes that would be helpful at least to me, that
> relate to serialization.
> I use serialization with mersenne_twister and python. To support
> this 2 changes are needed:
> 1) serialization must be build as a shared library. I know this
> doesn't
> work on all platforms, but I believe it works on at least some, and
> therefore should be supported.

Done in 1.33

> 2) Please add support for serialization to mersenne_twister.hpp. All
> that's needed is this:
> template<class Archive>
> void serialize(Archive & ar, const unsigned int version)
> {
> ar & x;
> ar & i;
> }

Hmm - well, if this doesn't make it into boost, I presume its not a obstacle
for you.

This raises a question that comes up from time to time. Where should code
for serialization of other types be placed? An who should be responible for

I would hope that individual library authors would take on the task of
implementing serialization for the data types that they support. This has
worked well with data-time, multi-index, and others. It hasn't worked for
variant or shared_ptr.

Next question is where should serializaton stuff be kept. Right now the
ones I've done - e.g. shared_ptr are kept in boost/serialization/.... I
believe others are kept in other places. I would like to see more
consistency on this but really no consensus has been reached. It does seem
that slow progress is being made here.

So I would like to see you or someone else take this code, make tests for it
and add it somewhere so it gets tested on all the compilers - which in the
past has turned out to be a bigger task than one would expect (though I
doubt that would be the case here).

There are a few other data types that to me are natural candidates for
serialziation, Quaternions, boost::any are ones I would like to see.

Robert Ramey

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