From 11a7270fabf0c39cca0771453ae8a5df42d58f42 Mon Sep 17 00:00:00 2001 From: Laurent Stacul Date: Mon, 22 Feb 2021 16:11:42 +0000 Subject: [PATCH 4/7] Fix recursive operator== call in C++20 (#1846) --- include/rapidjson/document.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 8e13d1cc..3c354a79 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -926,6 +926,7 @@ public: */ template RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); } +#ifndef __cpp_lib_three_way_comparison //! Equal-to operator with arbitrary types (symmetric version) /*! \return (rhs == lhs) */ @@ -936,6 +937,7 @@ public: */ template friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); } //@} +#endif //!@name Type //@{ -- 2.43.0