mirror of
https://github.com/nlohmann/json.git
synced 2024-07-04 21:36:57 +02:00
Fixes #2730
Added define JSON_VERSION_IS_PREDEFINED for skipping automatic JSON_HAS_CPP_* detection
This commit is contained in:
parent
7126d88803
commit
31c4c8f36c
|
@ -20,15 +20,18 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// C++ language standard detection
|
// C++ language standard detection
|
||||||
#if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
|
// 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)
|
||||||
#define JSON_HAS_CPP_20
|
#define JSON_HAS_CPP_20
|
||||||
#define JSON_HAS_CPP_17
|
#define JSON_HAS_CPP_17
|
||||||
#define JSON_HAS_CPP_14
|
#define JSON_HAS_CPP_14
|
||||||
#elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464
|
#elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464
|
||||||
#define JSON_HAS_CPP_17
|
#define JSON_HAS_CPP_17
|
||||||
#define JSON_HAS_CPP_14
|
#define JSON_HAS_CPP_14
|
||||||
#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
|
||||||
|
|
Loading…
Reference in a new issue