gate definition of symmetric equality operators on impl, not lib

These operators call themselves recursively if C++20 semantics are present in the compiler, regardless of standard library support for the operator; therefore the test should be on __cpp_impl_three_way_comparison, not __cpp_lib_[...].

This fixes the Value.EqualtoOperator test when the language standard is set to C++20 and the standard library does not yet define the library support macro.
This commit is contained in:
Kent Ross 2022-03-14 12:25:26 -07:00 committed by Milo Yip
parent 719304b113
commit 64faab2e92
1 changed files with 1 additions and 1 deletions

View File

@ -1092,7 +1092,7 @@ public:
*/
template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); }
#ifndef __cpp_lib_three_way_comparison
#ifndef __cpp_impl_three_way_comparison
//! Equal-to operator with arbitrary types (symmetric version)
/*! \return (rhs == lhs)
*/