Open
Description
From current stable version i'm getting this warning (with -Wall):
../ext/cereal//include/cereal/external/rapidjson/document.h:597:9: error: 'GenericValue' has a non-throwing exception specification but can still throw [-Werror,-Wexceptions]
CEREAL_RAPIDJSON_ASSERT(type <= kNumberType);
With latest Xcode (9.3) this is no longer a warning but an error. As dirty workaround ...
replace in
cereal/include/cereal/archives/json.hpp
#define CEREAL_RAPIDJSON_ASSERT(x) if(!(x)){
throw ::cereal::RapidJSONException("rapidjson internal assertion failure: " #x); }
by
#ifndef CEREAL_RAPIDJSON_ASSERT
#ifdef __APPLE__
#define CEREAL_RAPIDJSON_ASSERT(x) if(!(x)){ assert(0 && "fallo json");};
#else
#define CEREAL_RAPIDJSON_ASSERT(x) if(!(x)){ \
throw ::cereal::RapidJSONException("rapidjson internal assertion failure: " #x); }
#endif
#endif
Metadata
Metadata
Assignees
Labels
No labels