I had tried putting 'const' in the save function header. The code
compilation fails with "boost::STATIC_ASSERTION_FAILURE<x>" at
the "save_override" function in "basic_xml_oarchive.hpp".
I tried "BOOST_SERIALIZATION_BASE_OBJECT_NVP(obj)" and
"boost::serialization::base_object< <base<T> >(obj)" and
I am not able to compile the source code. Base object serialization
macros are not able to deduce the template argument list.
Pyush
Hi,
I am relatively a new to Boost serialization classes. I am trying to serialize a derived template class.
template<class T> class base {};
tempate<class T> class derived : public base<T> {};
I am trying to serialize 'derived' and have tried many different things. I am unable to serialize the inherited template classes.
For some reason the code calls
(1) 'derived::Serialize'
(2) 'base::Save'
and never executes 'derived:: Save' and doesnot serialize the 'derived' object properly.
I am attaching the source code (SerializeTemplates.cpp) and the output(output.txt) of the program.
I am using MSVC7.1, debug mode, Boost 1.33, Spirit 1.8
It will be great, if somebody could point out what I am doing wrong.
Thanks,
Pyush