Try the following changes: Federico Feller wrote:
Hi. I have problems defining a non-instrusive serialization of a class. Ive defined the following functions:
namespace boost { namespace serialization {
template<class Archive> inline void save( Archive & ar, const CLITimeStamp & t, const unsigned int /* file_version */ ){ std::string aux = std::string(t.get14LengthRepresentation()); ar & aux; }
template<class Archive> inline void load( Archive & ar, const CLITimeStamp & t, // can't be const as its going to be changed!!! remove const const unsigned int /* file_version */ ){ std::string aux; ar >> aux; t = CLITimeStamp((char*)aux.c_str()); }
template<class Archive> inline void serialize( Archive & ar, const CLITimeStamp & t, // can't be const as its going to be changed!!! remove const const unsigned int file_version ){ split_free(ar, t, file_version); }
}}