Boost logo

Boost :

Subject: [boost] Serialization of std::shared_ptr
From: Loïc Joly (loic.actarus.joly_at_[hidden])
Date: 2011-02-16 08:20:18


Hello,

I'm using the std::shared_ptr provided with MSVC 2010. I'd like to be
able to use boost.serialization to serialize some of those shared_ptrs.
I could find an old thread stating that std::tr1::shared_ptr were not
handled (and it looked impossible to make them work). Is the situation
the same with std::shared_ptr?

I thought of the "solution" of using boost::shared_ptr instead of
std::shared_ptr, but it is currently not the prefered option: We have
parts of our program independant from boost that use std::shared_ptr, we
would like those parts to remain independant from boost. And we have
other parts of our program where shared_ptr is used without
qualification, and where a "using namespace std" directive is active.
Switching to boost would incur either qualifying all shared_ptr uses, or
adding a "using namespace boost" but that would introduce ambiguities.

Thank you for your help!

-- 
Loïc

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk