diff -r 45d1d3143fe3 boost/random/mersenne_twister.hpp --- a/boost/random/mersenne_twister.hpp Tue Dec 11 13:26:15 2007 -0500 +++ b/boost/random/mersenne_twister.hpp Mon Dec 17 06:51:24 2007 -0500 @@ -27,6 +27,8 @@ #include #include #include +#include +#include namespace boost { namespace random { @@ -152,6 +154,16 @@ public: mt.i = mt.state_size; return is; } + + friend class boost::serialization::access; + + // Serialization + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & serialization::make_nvp ("i", i); + ar & serialization::make_nvp ("x", x); + } + #endif friend bool operator==(const mersenne_twister& x, const mersenne_twister& y)