From d77da05c1708ebe19c322ad8fe48bb793cb98228 Mon Sep 17 00:00:00 2001 From: Giovanni Cerretani Date: Wed, 25 Aug 2021 17:25:27 +0200 Subject: [PATCH 1/2] Fix #2975 Define JSON_DIAGNOSTICS to 0 if not defined to fix annoying Wundef warnings. --- include/nlohmann/detail/macro_scope.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp index 400530a60a..76a0dc62cf 100644 --- a/include/nlohmann/detail/macro_scope.hpp +++ b/include/nlohmann/detail/macro_scope.hpp @@ -301,3 +301,7 @@ #else #define JSON_EXPLICIT explicit #endif + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif From 9325ffbe0059fad150a96b7904d6854c77196e00 Mon Sep 17 00:00:00 2001 From: Giovanni Cerretani Date: Wed, 25 Aug 2021 18:10:11 +0200 Subject: [PATCH 2/2] amalgamated --- single_include/nlohmann/json.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5ba4a4bed7..fd97d9c286 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2514,6 +2514,10 @@ JSON_HEDLEY_DIAGNOSTIC_POP #define JSON_EXPLICIT explicit #endif +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + namespace nlohmann {