Added define JSON_VERSION_IS_PREDEFINED
for skipping automatic JSON_HAS_CPP_* detection
This commit is contained in:
David Pfahler 2021-04-21 11:03:28 +02:00
parent 7126d88803
commit 31c4c8f36c

View file

@ -20,6 +20,8 @@
#endif #endif
// C++ language standard detection // C++ language standard detection
// if the user wants to manually specify the used c++ version this is skipped
#ifndef JSON_VERSION_IS_PREDEFINED
#if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
#define JSON_HAS_CPP_20 #define JSON_HAS_CPP_20
#define JSON_HAS_CPP_17 #define JSON_HAS_CPP_17
@ -30,6 +32,7 @@
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1)
#define JSON_HAS_CPP_14 #define JSON_HAS_CPP_14
#endif #endif
#endif
// disable documentation warnings on clang // disable documentation warnings on clang
#if defined(__clang__) #if defined(__clang__)