Boost logo

Boost :

Subject: Re: [boost] [serialization] Must the objects being serialized outlive the archive?
From: Brian Wood (woodbrian77_at_[hidden])
Date: 2010-09-17 15:37:34


Robert Ramey:

> This would work. What won't work is
>
> {
> boost::scoped_ptr<Strings> s;
> const Strings * s = new Strings("Hello", "World"));
> const * x = s;
> oa << s;
> delete s;
> oa << x;
> ...
> }

Be sure to add the --automagically flag to get that to build.

> Your making this way too hard, just look at the examples and tests to see
> that all you have to do is serialize though a base class pointer.

You are being sloppy. But thanks for stopping the top posting.

Brian Wood
Ebenezer Enterprises
http://webEbenezer.net


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