Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] How do I make boost::serializationwork with std::shared_ptr?
From: Arman Schwarz (armanschwarz_at_[hidden])
Date: 2013-09-29 18:58:21


On Mon, Sep 30, 2013 at 6:48 AM, Robert Ramey <ramey_at_[hidden]> wrote:

> [...]

This was OK .... until now when we have a new shared_ptr to deal with.
> The real solution is to enhance the serialization API so that the code
> used for implementing boost::shared_ptr can be applied to other
> data types which are otherwise unserializable. Unfortunately, this
> is a non-trivial task which I have yet to get to. So for now I
> can't offer a real solution other than suggesting one use boost
> shared pointer rather than std::shared_ptr. I dont' know if this
> helps - but there it is.
>
>
 No, this helps a lot. I've switched to boost::shared_ptr and everything
seems to work.

Reading the documentation, I didn't immediately notice that
boost/serialization/shared_ptr.hpp was a specialization for the boost
shared pointers, not those of the standard library. This lead to my
confusion.

Cheers,
Arman



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