diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 2e116f104b..ae5c0a5522 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -3692,10 +3692,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #endif } + // template::value, int>::type = 0> /// @brief comparison: equal /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ - template - requires detail::json_compatible_type::value + template ::value, int>::type = 0> bool operator==(T rhs) const noexcept { return *this == basic_json(rhs); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 8ef520dc0c..44c7f5f3ff 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -22912,10 +22912,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #endif } + // template::value, int>::type = 0> /// @brief comparison: equal /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ - template - requires detail::json_compatible_type::value + template ::value, int>::type = 0> bool operator==(T rhs) const noexcept { return *this == basic_json(rhs);