0

I just moved on Cereal 1.2.0 (moved from 1.1.2), and I obtain a compilation error when using JSONOutputArchive or XMLOutputArchive (i.e. including either "cereal/archives/json.hpp" or "cereal/archives/xml.hpp")

std::stringstream outParamStream;

foo.enable = true;
foo.size = 12;

{
  cereal::JSONOutputArchive outArchive(outParamStream);
  outArchive(foo);
}

doSomeStuffWith(inParamStream->str());

Exact errors are :

..sources/ext/cereal/archives/json.hpp:158: error: looser throw specifier for 'virtual cereal::JSONOutputArchive::~JSONOutputArchive()'

..sources/ext/cereal/archives/json.hpp:402: error: looser throw specifier for 'virtual cereal::JSONInputArchive::~JSONInputArchive()'

..sources/ext/cereal/cereal.hpp:584: error:   overriding 'virtual cereal::InputArchive<cereal::JSONInputArchive>::~InputArchive() noexcept (true)'

I compile using -std=c++11, with gcc version 4.7.3

I do need a std::string so I can't move to binary or portable_binary archive.

Is anyone else experienced this error using Cereal 1.2.0 ?

Did I miss something (I can't believe they released such a thing as the header does not even compile) ?

Thanks !

Daemon Pulsar
  • 13
  • 1
  • 5
  • If this is a real issue maybe you should put on Cereal Github issue tracker ? – coincoin Jul 08 '16 at 13:54
  • I do not know if this is a "real issue" (i.e. not my fault), that's why I asked if someone else (more experienced) have the problem too. But, ok, I guess I can try asking on he issue tracker. – Daemon Pulsar Jul 08 '16 at 14:06
  • 1
    Opened as [#311](https://github.com/USCiLab/cereal/issues/311#issuecomment-231459121), tagged as a **bug** . Thanks ! – Daemon Pulsar Jul 10 '16 at 09:19

0 Answers0