Use SFINAE instead of 'requires' clause because of cppcheck.
This commit is contained in:
parent
f68d2b1475
commit
0c9adb13f5
@ -3692,10 +3692,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
#endif
|
||||
}
|
||||
|
||||
// template<typename ScalarType, typename std::enable_if<
|
||||
// std::is_scalar<ScalarType>::value, int>::type = 0>
|
||||
/// @brief comparison: equal
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_eq/
|
||||
template <typename T>
|
||||
requires detail::json_compatible_type<T, basic_json_t>::value
|
||||
template <typename T,
|
||||
std::enable_if<detail::json_compatible_type<T, basic_json_t>::value, int>::type = 0>
|
||||
bool operator==(T rhs) const noexcept
|
||||
{
|
||||
return *this == basic_json(rhs);
|
||||
|
||||
@ -22912,10 +22912,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
#endif
|
||||
}
|
||||
|
||||
// template<typename ScalarType, typename std::enable_if<
|
||||
// std::is_scalar<ScalarType>::value, int>::type = 0>
|
||||
/// @brief comparison: equal
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_eq/
|
||||
template <typename T>
|
||||
requires detail::json_compatible_type<T, basic_json_t>::value
|
||||
template <typename T,
|
||||
std::enable_if<detail::json_compatible_type<T, basic_json_t>::value, int>::type = 0>
|
||||
bool operator==(T rhs) const noexcept
|
||||
{
|
||||
return *this == basic_json(rhs);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user