Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] std::shared_ptr with Boost >= 1.53
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-05-03 19:34:44


beet-2 wrote
> Dear Robert,
>
> thanks a lot! Do I understand it correctly, that I could easily create
> my own serializer for std::shared_ptr by just (de)serializing the
> contained "raw" pointer and wrapping it into a std::shared_ptr in the
> case of de-serialization ?

No. You have to keep track of other shared pointers point

I had assumed from the question that the situation was something like:

// version 1
myclass {
    boost::shared_ptr m_p
...
}
// version 2
myclass {
    std::shared_ptr m_p
    ...
};

and the question was asking how the latest version code would de-serialize
older version (version 1) archives (data files)

Robert Ramey

--
View this message in context: http://boost.2283326.n4.nabble.com/serialization-std-shared-ptr-with-Boost-1-53-tp4674950p4675017.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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