This was a surprise to me.  Open up a Trak item and also mention which compiler you're using.
 
In the meantime you'll need to find a way to work around it.  I know that serialization
works for boost:variant.
 
Robert Ramey
 
"niranjan bangera" <niranjannina@gmail.com> wrote in message news:50a2f6f20901070600ocb96a43ka10ea96c3d0bc02c@mail.gmail.com...
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.


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users