diff --git a/cpp/Pose2.h b/cpp/Pose2.h index 7708a11b9..85f4f1c50 100644 --- a/cpp/Pose2.h +++ b/cpp/Pose2.h @@ -73,6 +73,14 @@ namespace gtsam { static inline size_t dim() { return 3; }; + private: + // Serialization function + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) { + ar & BOOST_SERIALIZATION_NVP(t_); + ar & BOOST_SERIALIZATION_NVP(r_); + } }; // Pose2 /** print using member print function, currently used by LieConfig */