
On 3/5/18 8:36 AM, Lars Ruoff via Boost-users wrote:
Maybe i didn't express it clearly enough. I want non-intrusive serialization. I want to modify neither ContqinerClass, nor MemberClass. (Both are just custom classes, no link with STL containers. I just wanted to express that Container contains an instance of Member)
So how can i write ar & c.special_member; since there is no serialize member function for this class?
That's the problem. the type of c.special_member must be serializable. If it's not already, you have to make it serializable by writing your own serialize function for it. It can be either intrusive or non-intrusive - doesn't matter. But it has to be there. The versioning of type type of special_member is handled in the serialization of that type.