From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id E435A3858D35; Thu, 23 Nov 2023 17:44:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E435A3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700761477; bh=rxX9KYS0mZsdR04AsKWMzgzMdRqYXBOURpqwMLSZHLU=; h=From:To:Subject:Date:From; b=XbwQCxj52vtIUC+M5xwc0ZTfe6QiB03zAWbvDhUd68C3XiKpjhwiKUTn7ZoOl9Ilk WZgojghpHjMN269VQoDbnXEj2AXhoA/r/OlUlsoXOIpNqW6AW3b6kXR6WDr4rPdyG/ Jn6Ri2T6IRB0ZcQUacwSkW04TNtd3HypRF/44XKA= 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 r14-5793] libstdc++: Fix access error in __gnu_test::uneq_allocator X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: dc2dfda0ece59db023dca92c8d44b130f3fdf2cc X-Git-Newrev: 0585daf7de0673ade9feca1be66a68178786b48d Message-Id: <20231123174437.E435A3858D35@sourceware.org> Date: Thu, 23 Nov 2023 17:44:37 +0000 (GMT) List-Id: https://gcc.gnu.org/g:0585daf7de0673ade9feca1be66a68178786b48d commit r14-5793-g0585daf7de0673ade9feca1be66a68178786b48d Author: Jonathan Wakely 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::other>& b) - { return a.personality == b.personality; } + { return a.personality == b.get_personality(); } template friend inline bool