serialization of a ptr

How do I prevent boost::serialize from treating a pointer as an object
and serializing the object. I have written the specialization of
save/load for the object pointer.
I get the following errors when I attempt to compile the program below...
boost/serialization/access.hpp: In static member function 'static void
boost::serialization::access::serialize(Archive&, T&, unsigned int)
[with Archive = boost::archive::binary_oarchive, T = X]':
boost/serialization/serialization.hpp:81: instantiated from 'void
boost::serialization::serialize(Archive&, T&, unsigned int) [with
Archive = boost::archive::binary_oarchive, T = X]'
boost/serialization/serialization.hpp:140: instantiated from 'void
boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with
Archive = boost::archive::binary_oarchive, T = X]'
boost/archive/detail/oserializer.hpp:151: instantiated from 'void
boost::archive::detail::oserializer

Here is my suggestion for you to try:
1. Use namespace boost serialization for those serialization method
2. take note that save is a const function, you may need to use const_cast
And if these steps does not works, you can refer to serialization examples
& tests provided on the boost package.
On Tue, Nov 1, 2011 at 13:42, Jonathan Bishop
participants (3)
-
Hazrat Pradipta Ranjali
-
Jonathan Bishop
-
Robert Ramey