diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-11-23 14:34:59 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-11-23 17:44:26 +0000 |
commit | 0585daf7de0673ade9feca1be66a68178786b48d (patch) | |
tree | eeb400f294d275b9de6c23f5fe9bd503607f9c4a | |
parent | dc2dfda0ece59db023dca92c8d44b130f3fdf2cc (diff) | |
download | gcc-0585daf7de0673ade9feca1be66a68178786b48d.zip gcc-0585daf7de0673ade9feca1be66a68178786b48d.tar.gz gcc-0585daf7de0673ade9feca1be66a68178786b48d.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/testsuite/util/testsuite_allocator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 70dacb3..1773b72 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 |