Changed serialization of FastMap to correctly chain the base Map class serialization included with boost::serialization
parent
fff86f98b5
commit
5abe56aaab
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <boost/pool/pool_alloc.hpp>
|
#include <boost/pool/pool_alloc.hpp>
|
||||||
|
#include <boost/serialization/map.hpp>
|
||||||
#include <boost/serialization/base_object.hpp>
|
#include <boost/serialization/base_object.hpp>
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
@ -57,10 +58,8 @@ public:
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
template<class ARCHIVE>
|
template<class ARCHIVE>
|
||||||
void serialize(ARCHIVE & ar, const unsigned int version) {
|
void serialize(ARCHIVE & ar, const unsigned int version) {
|
||||||
//You are not supposed to do this:
|
|
||||||
boost::serialization::serialize(ar, *this, version);
|
ar & boost::serialization::base_object<Base>(*this);
|
||||||
//Instead you are supposed to do this: but it doesnt work
|
|
||||||
// ar & boost::serialization::base_object<Base>(*this);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue