
7 Jan
2009
7 Jan
'09
2 p.m.
Hi all, I am using the boost version 1.36.0 , linux platform. In my project i have to srialize a Union . i tried in the same way that classes and structures been serialized. But it gives a compilation error. How can i do that.. Please help me doing this. union myunion { uint32_t a; float t; }; i tried using like this. union myunion { uint32_t a; float t; template <class Archive> void serialize(Archive & ar, const unsigned int file_version) { ar & a; ar & t; } i get an error when iwant to serialize the object of the union saying myunion is not a class or struct type. Pls help me to do this. thanks in Advance.