
This a limitation has been noted on a track item. I could imagine might be possible to work around it but for now it's a limitation Robert Ramey Kangkook Jee wrote:
Hi, all
I'm trying to use boost library for serialization of my program which contains many custom class definitions. However, I can't figure out how to handle a class member which is *pointer to pointers* such as 'a' from the following code snippet.
class B { A** a; friend class boost::serialization::access;
template<class Archive> void serialize(Archive &ar, const unsigned int version) { ar & a: .
Above code fails to be compiled with the following error message.
/usr/include/boost/archive/detail/oserializer.hpp:148:5: instantiated from void boost::archive::detail::oserializer
::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::text_oarchive, T = A*] serial0.cpp:118:1: instantiated from here /usr/include/boost/serialization/access.hpp:118:9: error: request for member serialize in t, which is of non-class type A* Do we have a typical way to handle a such case? I spend some time to find a solution from the web and tutorials but I couldn't.
I'm new to the boost library and your helps will be greatly appreciated.
Thanks, Kangkook