
Robert: right, I don't want to do/have neither a) nor b). The solution that Bill proposes does indeed what I need. However I wanted to avoid these kind of "global" flags and to know if there are already some built solutions wihtin the library itself. Here is my concrete case: struct parkinglot { // static data ... // simulation data ... template <class Archive> void serialize1(Archive& ar, const unsigned int version) { // static data // ... } template <class Archive> void serialize2(Archive& ar, const unsigned int version) { // simulation data // ... } }; I want to serialize static data indendently of the simulation data and vice versa. Of course, the best solution would be a redesign of this data structure. But the question is: does the library offer a solution to declare more than one form of serialization for the same type of Archive? Thanks, Vidal "Robert Ramey" <ramey@rrsd.com> schrieb im Newsbeitrag news:e7eck6$8g8$1@sea.gmane.org...
a) you shouldn't want to do this b) you shouldn't have to do this
If you want to do this anyway, try
class Foo { void serialize(boost::archive::binary_iarchive & ar, const unsigned int version); void serialize(boost::archive::text_iarchive & ar, const unsigned int version); void serialize(boost::archive::binary_oarchive & ar, const unsigned int version); void serialize(boost::archive::text_oarchive & ar, const unsigned int version); };
Rober Ramey