Serialization support for mersenne_twister

I know I've mentioned this before. I'd really like to see this tiny bit of code added to mersenne_twister: template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & x; ar & i; } This would make it very easy to use our new serialization library with mersenne_twister. It costs nothing if you don't use it. If you are really paranoid, it could be surrounded by an #ifdef.

don't for get to include friend class boost::serialization::access; while we're at it - same comment applies to:octonion, quarternion, and all other trivial serializations. non-trivial serializations - e.g. boost::shared_ptr should include something like: template<class Archive, class T> friend void serialization(Archive & ar, shared_ptr<T> & t); I would also like to see all these libraries include a small test of its serialization. Of course, I'm talking about boost 1.33+ Robert Ramey "Neal D. Becker" <ndbecker2@verizon.net> wrote in message news:cmdred$1qv$1@sea.gmane.org...
I know I've mentioned this before. I'd really like to see this tiny bit of code added to mersenne_twister:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & x; ar & i; }
This would make it very easy to use our new serialization library with mersenne_twister. It costs nothing if you don't use it. If you are really paranoid, it could be surrounded by an #ifdef.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Thu, Nov 04, 2004 at 01:12:29PM -0500, Neal D. Becker wrote:
I know I've mentioned this before. I'd really like to see this tiny bit of code added to mersenne_twister:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & x; ar & i; }
This would make it very easy to use our new serialization library with mersenne_twister. It costs nothing if you don't use it. If you are really paranoid, it could be surrounded by an #ifdef.
FWIW, I second the request for serialization support in mersenne_twister. For now I make do with a poor man's workaround, but I'd appreciate if there were a "clean" way to serialize mersenne_twister. Regards Christoph -- http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html
participants (3)
-
Christoph Ludwig
-
Neal D. Becker
-
Robert Ramey