public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-10227] libstdc++: Fix access error in __gnu_test::uneq_allocator
@ 2024-03-18 14:03 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2024-03-18 14:03 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:80e88183d47ca4d7c8441355f736fc918d7d05dc
commit r12-10227-g80e88183d47ca4d7c8441355f736fc918d7d05dc
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Nov 23 14:34:59 2023 +0000
libstdc++: Fix access error in __gnu_test::uneq_allocator
The operator== function is only a friend of the LHS argument, so cannot
access the private member of the RHS argument. Use the public accessor
instead.
libstdc++-v3/ChangeLog:
* testsuite/util/testsuite_allocator.h (uneq_allocator): Fix
equality operator for heterogeneous comparisons.
(cherry picked from commit 0585daf7de0673ade9feca1be66a68178786b48d)
Diff:
---
libstdc++-v3/testsuite/util/testsuite_allocator.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h
index f33f602d2af..0c41181b4a5 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.h
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h
@@ -418,7 +418,7 @@ namespace __gnu_test
operator==(const uneq_allocator& a,
const uneq_allocator<Tp1,
typename AllocTraits::template rebind<Tp1>::other>& b)
- { return a.personality == b.personality; }
+ { return a.personality == b.get_personality(); }
template<typename Tp1>
friend inline bool
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-18 14:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 14:03 [gcc r12-10227] libstdc++: Fix access error in __gnu_test::uneq_allocator Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).