From: Jonathan Wakely Date: Thu, 23 Nov 2023 14:34:59 +0000 (+0000) Subject: libstdc++: Fix access error in __gnu_test::uneq_allocator X-Git-Tag: basepoints/gcc-15~4346 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0585daf7de0673ade9feca1be66a68178786b48d;p=thirdparty%2Fgcc.git 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. --- diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 70dacb3fdf29..1773b723b66e 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::other>& b) - { return a.personality == b.personality; } + { return a.personality == b.get_personality(); } template friend inline bool