Sorry, still don't understand.
As said, i have defined
void serialize(Archive & ar, MemberClass & m, const unsigned int version);
so
template<class Archive>
void serialize(Archive & ar, ContainerClass & c, const unsigned int version)
{
ar & c.other_members; // easy - built-in type
serialize(ar, c.special_member, version); //use same version???
}
compiles.
My question is what *version* number do i need to provide in the call to serialize for c.special_member?
- The same as with what serialize(Archive & ar, ContainerClass & c, const unsigned int version) got called? (Like i did in example) This doesn't make sense to me.
- Or I need to handle it myself, say i need to call
serialize(ar, c.special_member, 3); because i *know* the current version of MemberClass is version 3.
- Or there is some archive magic i don't see.