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@neutralite.org>
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@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users