-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
9 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters