From aa891a42d7de37dcd1651f9c1ab77c986d92a0a3 Mon Sep 17 00:00:00 2001 From: Shane Grant Date: Mon, 26 Jun 2017 13:42:08 -0700 Subject: [PATCH] Resolves #414 --- include/cereal/archives/json.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/cereal/archives/json.hpp b/include/cereal/archives/json.hpp index 9d57434ab..d52ab465a 100644 --- a/include/cereal/archives/json.hpp +++ b/include/cereal/archives/json.hpp @@ -47,8 +47,14 @@ namespace cereal #endif // RAPIDJSON_ASSERT // Enable support for parsing of nan, inf, -inf +#ifndef CEREAL_RAPIDJSON_WRITE_DEFAULT_FLAGS #define CEREAL_RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNanAndInfFlag +#endif + +// Enable support for parsing of nan, inf, -inf +#ifndef CEREAL_RAPIDJSON_PARSE_DEFAULT_FLAGS #define CEREAL_RAPIDJSON_PARSE_DEFAULT_FLAGS kParseFullPrecisionFlag | kParseNanAndInfFlag +#endif #include "cereal/external/rapidjson/prettywriter.h" #include "cereal/external/rapidjson/ostreamwrapper.h"