Boost logo

Boost :

From: Kaj Björklund (kbjorklu_at_[hidden])
Date: 2005-01-26 06:44:14


Robert Ramey wrote:

> template<class Archive, class T>
> common_iarchive<Archive>::move(T & dest, T & source)
>
> which would do the assignment and update the tracking information. Then use
> it in the de-serializaton of all the collections.

Unless I'm mistaken, this also requires that all pointers to the
elements of the container need to unserialized *after* unserializing the
container itself. Unserializing pointers first will create the instances
which will be moved to the container later. Moving will not update the
original pointers, unless unserialization is retriggered for the objects
containing the pointers or some other trick is used.

Another issue is with vector's reallocation, but it appears that the
library already handles this.

-kaj


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