Boost logo

Boost Users :

Subject: [Boost-users] [Serialization and C++11] Using std::unique_ptr with boost::serialization
From: berenger.morel_at_[hidden]
Date: 2012-07-26 14:41:39


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 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