samedi 22 mai 2021

Deserializing only some variables with cereal

I'm saving a structure to json file using cereal, for example:

struct FileData
{
   int val1;
   float val2;
   std::string str;
};

When I read the file I want to read only some variables, for example val1 and val2. Can I do that with cereal?

Aucun commentaire:

Enregistrer un commentaire