From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id C21913857C4E; Fri, 26 Nov 2021 16:34:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C21913857C4E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r10-10306] libstdc++: Make allocator equality comparable in tests X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 5c86e63cb0383a38ec3dea24e9b3fe2f6e312057 X-Git-Newrev: 6a38ddc2e015ee178776f668337ed2a88d474f63 Message-Id: <20211126163450.C21913857C4E@sourceware.org> Date: Fri, 26 Nov 2021 16:34:50 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2021 16:34:50 -0000 https://gcc.gnu.org/g:6a38ddc2e015ee178776f668337ed2a88d474f63 commit r10-10306-g6a38ddc2e015ee178776f668337ed2a88d474f63 Author: Jonathan Wakely Date: Mon Aug 9 11:36:07 2021 +0100 libstdc++: Make allocator equality comparable in tests libstdc++-v3/ChangeLog: * testsuite/23_containers/unordered_map/cons/default.cc: Add equality comparison operators to allocator. * testsuite/23_containers/unordered_set/cons/default.cc: Likewise. (cherry picked from commit 2eff2a3cb521c58212885a3dca638764285b5691) Diff: --- libstdc++-v3/testsuite/23_containers/unordered_map/cons/default.cc | 3 +++ libstdc++-v3/testsuite/23_containers/unordered_set/cons/default.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/default.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/default.cc index d64d078a7da..7a785e980b1 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/default.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/default.cc @@ -18,6 +18,9 @@ template void deallocate(T *p, std::size_t n) { std::allocator().deallocate(p, n); } + + bool operator==(const NoDefaultConsAlloc&) const { return true; } + bool operator!=(const NoDefaultConsAlloc&) const { return false; } }; using Map = std::unordered_map, std::equal_to, diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/default.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/default.cc index 41281d3d774..fb87c96ce9d 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/default.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/default.cc @@ -18,6 +18,9 @@ template void deallocate(T *p, std::size_t n) { std::allocator().deallocate(p, n); } + + bool operator==(const NoDefaultConsAlloc&) const { return true; } + bool operator!=(const NoDefaultConsAlloc&) const { return false; } }; using Set = std::unordered_set, std::equal_to,