Nguyen Kim Son wrote:
> Hello,
>
> I've tried a simple example with the serialization of a class that
> contains an int and a pointer to int (named "nothing" in the code)
> but after having tried both  ar & (*b) and  ar & b (b is the second
> variable), I have not been succeeded to send the class via the call
> "send" (in boost::mpi).   
> My code is found at:
> http://www.copypastecode.com/29170/
> Does anyone has an idea of why it doesn't work?
> Thank you in advance!
>
> Son.
 
This would be a pointer to a primitive.  Correct serialization of a pointer
requires that all pointers to a type be tracked.  No one would want to
do this for all integers in the program.  If you really want to serialize
a pointer to a primitive type - like an int - use BOOST_SERIALIZATION_STRONGTYPEDEF
to make a distinct type equivalent to an int which is not in fact an int.
 
Review the manual regarding serialization of pointers which has
some subtle aspects.
 
Robert Ramey