File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -788,12 +788,20 @@ BinaryOpWrappedRhs(&);
788788BinaryOpWrappedRhs (|);
789789BinaryOpWrappedRhs (<<);
790790BinaryOpWrappedRhs (>>);
791+
792+ // GCC10.1 to GCC13 has a bug where it selects the wrong overload of operator==
793+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114549 . However C++ 20 also
794+ // provides reverse comparisons by default, and so we no longer need to define
795+ // them. Thus, from C++ 20, we do not define the reverse operators.
796+ #if __cplusplus < 202002L
791797BinaryOpWrappedRhs (==);
792798BinaryOpWrappedRhs (!=);
793799BinaryOpWrappedRhs (<);
794800BinaryOpWrappedRhs (<=);
795801BinaryOpWrappedRhs (>);
796802BinaryOpWrappedRhs (>=);
803+ #endif
804+
797805#undef BinaryOpWrappedRhs
798806
799807#define BooleanBinaryOpWrappedRhs (opSymbol ) \
You can’t perform that action at this time.
0 commit comments