Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] std::shared_ptr with Boost >= 1.53
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2015-05-04 13:46:16


On Mon, May 4, 2015 at 1:21 PM, beet <r.berlich_at_gemfony.eu> wrote:
> Robert,
>
> there seems to be a misunderstanding here, and I apoligize for not
> having been more clear before. Here is the history again:
>
> - I have converted a client-server application from using
> boost::shared_ptr to std::shared_ptr
>
> - The server now needs to serialize a ** std::shared_ptr ** and the
> client wants to receive a ** std::shared_ptr **
>
> - No boost::shared_ptr is involved anymore, and the problem is NOT the
> conversion from a boost::shared_ptr - based archive to a std::shared_ptr
> archive
>
> - Serialization of std::shared_ptr works with Boost 1.58, but isn't
> supported by Boost 1.53
>
> - I need to make it work with older versions of Boost than 1.58, so I
> need to "teach" 1.53 to (de-)serialize a std::shared_ptr
>
>
> There seem to be two options here:
>
> - Back-porting the 1.58 boost/serialization/shared_ptr.hpp and
> conditionally including it, when I detect Boost versions older than 1.58
>
> - Creating my own (de-)serialization code for a std::shared_ptr
>
> My question really was, whether backporting 1.58's
> boost/serialization/shared_ptr.hpp to Boost 1.53 is feasible .

If it's me making that decision, I opt for progression, not
regression, making it work for 1.58+. There may be good reasons for
considering 1.53 still, breaking changes, etc, however.

But I digress...

Good luck!

> Best Regards,
> Beet
>
>
>
> Am 04.05.15 um 18:04 schrieb Robert Ramey:
>> The serialization library includes code to serialize both boost::shared_ptr
>> and std::shared_ptr.
>>
>> The serialization library also includes effective facilities for handling
>> multiple versions of class en the evolution of versioning over time. This
>> is explained in the manual and illustrated via numerous examples.
>>
>> The only thing I can say is that you should spend a little more time
>> studying the documentation and making some test programs to become familiar
>> with it.
>>
>> Robert Ramey
>>
>>
>>
>>
>> --
>> View this message in context: http://boost.2283326.n4.nabble.com/serialization-std-shared-ptr-with-Boost-1-53-tp4674950p4675052.html
>> Sent from the Boost - Users mailing list archive at Nabble.com.
>>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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