Fix -Wunused warnings on JSON_DIAGNOSTICS (#2976)

* Fix #2975

Define JSON_DIAGNOSTICS to 0 if not defined to fix annoying Wundef warnings.

* amalgamated
pull/2986/head
Giovanni Cerretani 2021-08-26 07:35:01 +02:00 committed by GitHub
parent 1fd2213fd2
commit 28a169725e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -301,3 +301,7 @@
#else
#define JSON_EXPLICIT explicit
#endif
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif

View File

@ -2514,6 +2514,10 @@ JSON_HEDLEY_DIAGNOSTIC_POP
#define JSON_EXPLICIT explicit
#endif
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
namespace nlohmann
{