diff options
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/balance.h b/src/balance.h index fe8afe2b..5452510b 100644 --- a/src/balance.h +++ b/src/balance.h @@ -80,7 +80,7 @@ class balance_t multiplicative<balance_t, long> > > > > > > > > > > > > > { public: - typedef std::map<const commodity_t *, amount_t> amounts_map; + typedef std::map<commodity_t *, amount_t> amounts_map; amounts_map amounts; @@ -523,6 +523,18 @@ public: } return true; } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & amounts; + } +#endif // HAVE_BOOST_SERIALIZATION }; inline std::ostream& operator<<(std::ostream& out, const balance_t& bal) { |