Changed serialization of FastMap to correctly chain the base Map class serialization included with boost::serialization

release/4.3a0
John Rogers 2011-02-07 16:23:06 +00:00
parent fff86f98b5
commit 5abe56aaab
1 changed files with 3 additions and 4 deletions

View File

@ -20,6 +20,7 @@
#include <map>
#include <boost/pool/pool_alloc.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/base_object.hpp>
namespace gtsam {
@ -57,10 +58,8 @@ public:
friend class boost::serialization::access;
template<class ARCHIVE>
void serialize(ARCHIVE & ar, const unsigned int version) {
//You are not supposed to do this:
boost::serialization::serialize(ar, *this, version);
//Instead you are supposed to do this: but it doesnt work
// ar & boost::serialization::base_object<Base>(*this);
ar & boost::serialization::base_object<Base>(*this);
}
};