mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
* Exclude std::any from implicit conversion Fixes #3428 (MSVC) and silences compiler warning on GCC (-Wconversion). * Exclude std::any from implicit conversion
This commit is contained in:
committed by
GitHub
parent
10344907ff
commit
1deeb434c6
@ -17287,6 +17287,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||
|
||||
|
||||
#if defined(JSON_HAS_CPP_17)
|
||||
#include <any>
|
||||
#include <string_view>
|
||||
#endif
|
||||
|
||||
@ -19084,6 +19085,9 @@ 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)
|
||||
detail::negation<std::is_same<ValueType, std::any>>,
|
||||
#endif
|
||||
detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
|
||||
>::value, int >::type = 0 >
|
||||
|
Reference in New Issue
Block a user