Pooyan Dadvand wrote:
The question is not the name of the method, the problem is the additional parameter which boost::serialization cannot pass to me. For this reason I have to call my own serialize method inside the standard serialize method prepared for boost::serialization.
template<class TArchiveType> MyContainer::serialize(TArchiveType &rArchive, const unsigned int Version) { p_variable_data->MyCustomSerialize(rArchive, Version, MyData); }
try the following: template<class TArchiveType> MyContainer::serialize(TArchiveType &rArchive, const unsigned int Version) { rArchive << p_variable_data; } or template<class TArchiveType> MyContainer::serialize(TArchiveType &rArchive, const unsigned int Version) { rArchive << std::pair<?, ?>(p_variable_data, MyData); } I'm sure that there is an easy way to use the library to get the effect you want. But it will require effort to see it. Robert Ramey