0

Possible Duplicate:
Is it safe to serialize a raw boost::variant?

I would like to serialize a boost::variant type of nonPOD classes. Would you please tell me if that is possible and show me how to do it?

typedef boost::variant<macro,module> mvar
Community
  • 1
  • 1
Binh Van Pham
  • 111
  • 10
  • 1
    I searched for "Boost serialize variant" on Google and got [this SO answer.](http://stackoverflow.com/a/1196195/734069) Obviously, you'd remove the `enable_if` part for POD types. And your types must be serializable. – Nicol Bolas May 03 '12 at 04:58
  • And more precisely: http://stackoverflow.com/a/3420439/147192 – Matthieu M. May 03 '12 at 06:07
  • First, I would like to thank you for your help. Would you please also show me the serialization part? I was confused. How are we gonna past the archive in? – Binh Van Pham May 03 '12 at 23:57

0 Answers0