Trying to serialize this simple class:
class Data
{
public:
Data();
Data(boost::uuids::uuid id);
Data(const Data&) = delete;
Data& operator=(const Data&) = delete;
inline boost::uuids::uuid getGuid() { return guid; }
template <class Archive>
void serialize(Archive & ar)
{
ar(guid);
}
private:
boost::uuids::uuid guid;
};
But I get this error message
error C2338: Trying to serialize an unserializable type with an output archive.
Poiting to the uuid. The boost serialization way to enable this would be to add
#include <boost/uuid/uuid_serialize.hpp>
but this doesn't work for cereal out of the box. Cereal documentation says
cereal archives operate on either an std::ostream or std::istream object.
so I tried adding the header where there are defined but no luck
#include <boost/uuid/uuid_io.hpp>