test: Fix Wambiguous-reversed-operator compiler warnings
Summary:
Add a missing const to avoid the C++20 clang compiler warning:
src/test/serialize_tests.cpp: In member function ‘void serialize_tests::class_methods::test_method()’: src/test/serialize_tests.cpp:437:32: warning: C++20 says that these are ambiguous, even though the second is reversed: 437 | BOOST_CHECK(methodtest1 == methodtest2);
This is a backport of core#24406
Depends on D18835
Test Plan:
With CMAKE_CXX_STANDARD 20 in src/CMakeLists.txt:
ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18836