
28 May
2010
28 May
'10
3:52 a.m.
Zitat von Archie14
I use std::istream and std::ostream for binary serialization ( can't use boost::serialization) and can't find a way to serialize boost::variant
. I'll appreciate a code sample or link to the documentation. Thanks.
boost/serialization/variant.hpp you could either use that code, even though you're not using a archive from Boost.Serialization, but it also shows how to serialize a boost::variant if you want to write your own code (visitor for saving, iteration for loading)