From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id E075D3858413; Mon, 9 Aug 2021 10:44:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E075D3858413 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 r12-2809] libstdc++: Make allocator equality comparable in tests X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 527a1cf32c27a3fbeaf6be7596241570d864cc4c X-Git-Newrev: 2eff2a3cb521c58212885a3dca638764285b5691 Message-Id: <20210809104442.E075D3858413@sourceware.org> Date: Mon, 9 Aug 2021 10:44:42 +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: Mon, 09 Aug 2021 10:44:43 -0000 https://gcc.gnu.org/g:2eff2a3cb521c58212885a3dca638764285b5691 commit r12-2809-g2eff2a3cb521c58212885a3dca638764285b5691 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. 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,