You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure binary operators are const to fix C++20 (#33033)
Fix errors of the form
../../src/system/tests/TestSystemPacketBuffer.cpp:1063:72: error: C++20 says that these are ambiguous, even though the second is reversed: [-Werror]
1063 | NL_TEST_ASSERT(inSuite, config_1.handle == original_handle_1);
| ^~~~~~~~~~~~~~~~~
../../third_party/nlunit-test/repo/src/nlunit-test.h:366:15: note: in definition of macro ‘NL_TEST_ASSERT’
366 | if (!(inCondition)) \
| ^~~~~~~~~~~
../../src/system/SystemPacketBuffer.h:690:10: note: candidate 1: ‘bool chip::System::PacketBufferHandle::operator==(const chip::System::PacketBufferHandle&)’
690 | bool operator==(const PacketBufferHandle & aOther) { return mBuffer == aOther.mBuffer; }
| ^~~~~~~~
../../src/system/SystemPacketBuffer.h:690:10: note: candidate 2: ‘bool chip::System::PacketBufferHandle::operator==(const chip::System::PacketBufferHandle&)’ (reversed)
../../src/system/SystemPacketBuffer.h:690:10: note: try making the operator a ‘const’ member function
when compiling with cpp_standard="gnu++20" by making sure comparators
are const members.
0 commit comments