
Have you included
#include
Hi there,
I'm trying to convert a piece of code from templated archives to polymorphic ones, and am running into trouble when serializing std::string. Either I get an error message saying that std::string has no serialize member function, or I get the attached message.
The relevant code is this:
---snip--- #include
#include
#include void mtime::serialize(boost::archive::polymorphic_iarchive& ar, const unsigned int file_version) { std::string iso; ar & boost::serialization::make_nvp("iso_time", iso); set_from_iso_string(iso); }
void mtime::serialize(boost::archive::polymorphic_oarchive& ar, const unsigned int file_version) { std::string iso =3D to_iso_string(); ar & boost::serialization::make_nvp("iso_time", iso); } ---snip---
Am I missing something obvious? Are certain types not directly supported for serialization via polymorphic archives? Any help would be much appreciated.