嗨有任何人已經設法序列化與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