HomePhabricator

test: Fix Wambiguous-reversed-operator compiler warnings

Description

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Feb 21 2022, 15:45
PiRKCommitted on Mon, Oct 27, 16:10
PiRKPushed on Mon, Oct 27, 16:10
Reviewer
Restricted Project
Differential Revision
D18836: test: Fix Wambiguous-reversed-operator compiler warnings
Parents
rABC297b0b79e4cc: fs: work around u8path deprecated-declaration warnings with libc++
Branches
Unknown
Tags
Unknown