Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-11-08 20:09:15

"Peter Dimov" <pdimov_at_[hidden]> wrote in message

> Specifically, the current scheme for serializing a boost::shared_ptr is
> suboptimal, because it can't be used with another implementation of
> std::tr1::shared_ptr.

In general, serialization for any class is specific to that class
implementation. I don't think
makes sense to require that a serializtion implementation be independent of
the particular class implementtion. To do so will often result in a less
than optimal

> And getting back to our filesystem example, if the interface states that
> external representation of a fs::path is the std::string returned by
> string(), then the library should provide support for just that, but in
> meantime, it should be possible for the end user to non-intrusively
> serialize a fs::path by defining an appropriate serialize(Archive&,
> fs::path&, unsigned long) overload.

By requiring that fs::path expose enough of its state to be serializable.
can be done either with an appropriate friend declaration or by making
somethings public.

Robert Ramey

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