Serializing boost::variant?

24 Nov
2005
24 Nov
'05
4:33 a.m.
If I have a boost::variant data member I want to serialize, it looks like I'm going to have to use boost::static_visitor and boost::apply_visitor in the serialize() method. However, there is some black magic going on with the ar & dataMember; statements. Any pointers as to how I do it? Merrill

24 Nov
24 Nov
6:26 a.m.
or you just do: #include <boost/serialization/variant.hpp> Merrill Cornish wrote:
If I have a boost::variant data member I want to serialize, it looks like I'm going to have to use boost::static_visitor and boost::apply_visitor in the serialize() method. However, there is some black magic going on with the
ar & dataMember;
statements. Any pointers as to how I do it?
Merrill
7121
Age (days ago)
7121
Last active (days ago)
1 comments
2 participants
participants (2)
-
Merrill Cornish
-
Robert Ramey