Merge pull request #1847 from stac47/fix_1846

Fix recursive operator== call in C++20 (#1846)
This commit is contained in:
Milo Yip 2021-02-23 10:21:11 +08:00 committed by GitHub
commit 8be64594f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1083,6 +1083,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
//! Equal-to operator with arbitrary types (symmetric version)
/*! \return (rhs == lhs)
*/
@ -1093,6 +1094,7 @@ public:
*/
template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); }
//@}
#endif
//!@name Type
//@{