24 Jun
2010
24 Jun
'10
4:33 p.m.
agrosjea wrote:
BOOST_SERIALIZATION_BASE_OBJECT_NVP isnt working in a non intrusive case, since the macro uses this.
Hmmm - this never came up before. But look likes your correct. The
definition
of BOOST_SERIALIZATION_BASE_OBJECT_NVP is
#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \
boost::serialization::make_nvp( \
BOOST_PP_STRINGIZE(name), \
boost::serialization::base_object<name >(*this) \
)
So you might try:
template<class Archive>
void save(Archive &ar, const my_class & t, const unsigned version){
ar << boost::serialization::make_nvp(
"base_class_name",
boost::serialization::base_object