Fix compile error with _HAS_STATIC_RTTI=1
This commit is contained in:
parent
a0c1318830
commit
f9bcc2061f
@ -133,6 +133,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef JSON_HAS_STATIC_RTTI
|
||||||
|
#if defined(_HAS_STATIC_RTTI) && _HAS_STATIC_RTTI != 0
|
||||||
|
#define JSON_HAS_STATIC_RTTI 1
|
||||||
|
#else
|
||||||
|
#define JSON_HAS_STATIC_RTTI 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef JSON_HAS_CPP_17
|
#ifdef JSON_HAS_CPP_17
|
||||||
#define JSON_INLINE_VARIABLE inline
|
#define JSON_INLINE_VARIABLE inline
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
||||||
#undef JSON_HAS_THREE_WAY_COMPARISON
|
#undef JSON_HAS_THREE_WAY_COMPARISON
|
||||||
#undef JSON_HAS_RANGES
|
#undef JSON_HAS_RANGES
|
||||||
|
#undef JSON_HAS_STATIC_RTTI
|
||||||
#undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
|
#undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,9 @@
|
|||||||
#include <nlohmann/ordered_map.hpp>
|
#include <nlohmann/ordered_map.hpp>
|
||||||
|
|
||||||
#if defined(JSON_HAS_CPP_17)
|
#if defined(JSON_HAS_CPP_17)
|
||||||
#include <any>
|
#if JSON_HAS_STATIC_RTTI
|
||||||
|
#include <any>
|
||||||
|
#endif
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1888,7 +1890,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914))
|
#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914))
|
||||||
detail::negation<std::is_same<ValueType, std::string_view>>,
|
detail::negation<std::is_same<ValueType, std::string_view>>,
|
||||||
#endif
|
#endif
|
||||||
#if defined(JSON_HAS_CPP_17)
|
#if defined(JSON_HAS_CPP_17) && JSON_HAS_STATIC_RTTI
|
||||||
detail::negation<std::is_same<ValueType, std::any>>,
|
detail::negation<std::is_same<ValueType, std::any>>,
|
||||||
#endif
|
#endif
|
||||||
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
|
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
|
||||||
|
|||||||
@ -2485,6 +2485,14 @@ JSON_HEDLEY_DIAGNOSTIC_POP
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef JSON_HAS_STATIC_RTTI
|
||||||
|
#if defined(_HAS_STATIC_RTTI) && _HAS_STATIC_RTTI != 0
|
||||||
|
#define JSON_HAS_STATIC_RTTI 1
|
||||||
|
#else
|
||||||
|
#define JSON_HAS_STATIC_RTTI 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef JSON_HAS_CPP_17
|
#ifdef JSON_HAS_CPP_17
|
||||||
#define JSON_INLINE_VARIABLE inline
|
#define JSON_INLINE_VARIABLE inline
|
||||||
#else
|
#else
|
||||||
@ -19278,7 +19286,9 @@ NLOHMANN_JSON_NAMESPACE_END
|
|||||||
|
|
||||||
|
|
||||||
#if defined(JSON_HAS_CPP_17)
|
#if defined(JSON_HAS_CPP_17)
|
||||||
#include <any>
|
#if JSON_HAS_STATIC_RTTI
|
||||||
|
#include <any>
|
||||||
|
#endif
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -21104,7 +21114,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914))
|
#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914))
|
||||||
detail::negation<std::is_same<ValueType, std::string_view>>,
|
detail::negation<std::is_same<ValueType, std::string_view>>,
|
||||||
#endif
|
#endif
|
||||||
#if defined(JSON_HAS_CPP_17)
|
#if defined(JSON_HAS_CPP_17) && JSON_HAS_STATIC_RTTI
|
||||||
detail::negation<std::is_same<ValueType, std::any>>,
|
detail::negation<std::is_same<ValueType, std::any>>,
|
||||||
#endif
|
#endif
|
||||||
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
|
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
|
||||||
@ -24506,6 +24516,7 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC
|
|||||||
#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
||||||
#undef JSON_HAS_THREE_WAY_COMPARISON
|
#undef JSON_HAS_THREE_WAY_COMPARISON
|
||||||
#undef JSON_HAS_RANGES
|
#undef JSON_HAS_RANGES
|
||||||
|
#undef JSON_HAS_STATIC_RTTI
|
||||||
#undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
|
#undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user