...to avoid
> In file included from tools/qa/cppunit/test_rectangle.cxx:10:
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:59:18: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'const tools::Rectangle' and 'const tools::Rectangle') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
> return x == y;
> ~ ^ ~
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:166:30: note: in instantiation of member function 'CppUnit::assertion_traits<tools::Rectangle>::equal' requested here
> if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
> ^
> tools/qa/cppunit/test_rectangle.cxx:70:9: note: in instantiation of function template specialization 'CppUnit::assertEquals<tools::Rectangle>' requested here
> CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
> ^
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:333:17: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL'
> ( CPPUNIT_NS::assertEquals( (expected), \
> ^
> include/tools/gen.hxx:817:18: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
> bool operator == ( const RectangleT& rRect ) const
> ^
when building with -std=c++20 (cf.
<https://gerrit.libreoffice.org/c/core/+/155121> "Bump baseline to C++20")
against at least Xcode 14.3.1.
It was presumably an accidental oversight that
b6b26421a1 "split Point/Size/Rectangle into
AbsoluteScreenPixel* types" made these operators asymmetric in the first place.
Change-Id: Ic1f08b79fbd727d972ce95c3f21eab3a2a74f942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155221
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>