public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-5793] libstdc++: Fix access error in __gnu_test::uneq_allocator Date: Thu, 23 Nov 2023 17:44:37 +0000 (GMT) [thread overview] Message-ID: <20231123174437.E435A3858D35@sourceware.org> (raw) https://gcc.gnu.org/g:0585daf7de0673ade9feca1be66a68178786b48d commit r14-5793-g0585daf7de0673ade9feca1be66a68178786b48d 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. 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 70dacb3fdf2..1773b723b66 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
reply other threads:[~2023-11-23 17:44 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231123174437.E435A3858D35@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).