嗨有任何人已经设法序列化与boost ::序列化的C++ 11 std :: shared_ptr。有很多过时的帖子,但没有一个可以接受的解决方案。我不打算讨论为什么我要使用std :: shared_ptr只是接受它!C++ 11 std :: shared_ptr + boost :: serialization
我发现这个其他帖子:boost serialize and std::shared_ptr但它不回答我的问题如何序列化std :: shared_ptr它只建议使用boost :: shared_ptr这是不可能在我的情况。
而这个帖子How can boost::serialization be used with std::shared_ptr from C++11?也只推荐使用boost :: shared_ptr。
如果任何人已经找到一个工作,管理序列化std :: shared_ptr,我会感兴趣。
嘿家伙我终于找到了我的问题的解决方案,请参阅https://stackoverflow.com/a/14999396/2039157我的答案。
将std :: shared_ptr转换为boost :: shared_ptr以进行序列化。 – ForEveR 2013-02-20 07:59:19
是的,我打算说,如果使用'boost :: shared_ptr'是一个选项,这是答案:http://stackoverflow.com/questions/9944274/boost-serialize-and-stdshared-ptr – jogojapan 2013-02-20 08:00:35
嗯,转换是什么意思?我希望你不是要用boost :: shared_ptr;来代替std :: shared_ptr)请给出一个关于转换如何工作的例子。 – denim 2013-02-20 08:03:42