Boost logo

Boost Users :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-08-05 21:23:39


On Tue, Aug 5, 2008 at 5:05 PM, Robert Ramey <ramey_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>> it a good idea for the shared_ptr
>> serialization to be implemented in terms of the T * object contained
>> in a boost::shared_ptr<T>?
>
> The current implementation of serialization of boost::shared_ptr
> depends only upon the published public interface of boost::shared_ptr.
> (personally I have some complaints about that public interface though).
> Assuming that std::shared_ptr has the same published interface
> as boost::shared_ptr - I would expect the serialization implemenation
> would be the same.

Then maybe I misunderstood your earlier reply, that
boost::shared_ptr<std::string> can't be serialized directly because it
contains a std::string pointer. That's why I brought up the pointer
stored in std::string, which is an implementation detail indeed, as is
the T pointer in boost::shared_ptr<T>.

So, why wouldn't shared_ptr<std::string> "just work" when serialized,
even if serializing std::string raw pointers doesn't?

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net