diff options
author | Kent Ross <k@mad.cash> | 2022-03-14 22:25:26 +0300 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2022-05-24 05:03:13 +0300 |
commit | 64faab2e9235ed51f37ef592010b35fc7f7324ec (patch) | |
tree | 90a3dc6151790a24c25020f6ead0ee517acc18bc | |
parent | 719304b113c39c6d60a14afe9a15ffac6e2bc0d3 (diff) |
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.
-rw-r--r-- | include/rapidjson/document.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 0c4c229e..4f1e2467 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -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) */ |