diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index ae5c0a552..77dd000ed 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -3696,8 +3696,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec // std::is_scalar::value, int>::type = 0> /// @brief comparison: equal /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ - template ::value, int>::type = 0> + template + requires detail::json_compatible_type::value 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 39aebedad..bb2cbb8f3 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -22917,8 +22917,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec // std::is_scalar::value, int>::type = 0> /// @brief comparison: equal /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ - template ::value, int>::type = 0> + template + requires detail::json_compatible_type::value bool operator==(T rhs) const noexcept { return *this == basic_json(rhs);