Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization and C++11] Using std::unique_ptr with boost::serialization
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2012-07-26 17:31:36


Please read the documentation:
http://www.boost.org/doc/libs/1_50_0/libs/serialization/doc/index.html

If Boost.S11n doesn't provide you a header for the target class, you can
either adapt it intrusively by adding a member function or non-intrusively
with a free function (See Tutorial->Non Intrusive Version).

Regards,
Júlio.

2012/7/26 <berenger.morel_at_[hidden]>

> Hello.
>
> I am trying to serialize a node of a DP composite. This would probably be
> straightforward if I used raw pointers, but I am using std::unique_ptr.
>
> I am not sure it is possible, since I tried to find the word unique_ptr in
> my /usr/include/boost directory and found almost nothing (except
> interprocess and chrono which have been installed for other purposes).
>
> So, is there is a way to use serialization on unique_ptr, or is there is a
> reason to avoid doing this?
>
> Note:
> I have made some tries with using boost::serialization on my objects as if
> they were raw pointers and it have obviously failed, because expected type
> seems to be only raw pointer and unique_ptr is not compatible with it.
>
> ______________________________**_________________
> 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