10 Mar
2013
10 Mar
'13
7:20 a.m.
Am 10.03.2013 01:27, schrieb Silviu P:
Hi,
I'm trying to serialize a boost::shared_ptr to a custom archive. The compiler complains about the archive missing methods 'append' and 'reset'. Does anyone know where I should look to find out more information about these two methods?
Derive your archive class from detail::shared_ptr_helper, defined in archive/shared_ptr_helper.hpp, and it should work. As to why this is undocumented and in namespace detail I can only speculate, but this is what the other archive classes do.
/usr/include/boost/serialization/shared_ptr.hpp:133:9: error: ‘class my_iarchive’ has no member named ‘append’ /usr/include/boost/serialization/shared_ptr.hpp:139:5: error: ‘class my_iarchive’ has no member named ‘reset’