1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

Fix compile error with _HAS_STATIC_RTTI=0 (#4046)

This commit is contained in:
alferov
2023-09-24 12:23:41 +03:00
committed by GitHub
parent bbd2e1636d
commit 6d4b72d3c3
5 changed files with 57 additions and 4 deletions

View File

@ -62,7 +62,9 @@
#include <nlohmann/ordered_map.hpp>
#if defined(JSON_HAS_CPP_17)
#include <any>
#if JSON_HAS_STATIC_RTTI
#include <any>
#endif
#include <string_view>
#endif
@ -1886,7 +1888,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))
detail::negation<std::is_same<ValueType, std::string_view>>,
#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>>,
#endif
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>