From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 247493858C5F; Fri, 1 Mar 2024 18:24:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 247493858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709317482; bh=UQfQ5uSXMebAYCgXv8hUn6DQy1DOlurnr8vONC9kz7Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SQwibEmkAHXAKDW9zWUt57C4Ewi06jYLF5rnJc1/WAhtq4K1uY1OzuJxgFh1XU1pi C5hJFR6okSNUnwGXviIzbnfI7TQ6W77ZfDaHbs5YLff/f0RqldOWsHhxXvutjZNNls 3+ToNGRwtLntyc5mTTvVxOn07uTkw3vU3g3Pvlb4= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113841] Can't swap two std::hash Date: Fri, 01 Mar 2024 18:24:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113841 --- Comment #10 from Jonathan Wakely --- This one's much harder to fix: #include template struct Alloc { using value_type =3D T; Alloc(int) { } template Alloc(const Alloc&) { } T* allocate(std::size_t n) { return std::allocator().allocate(n); } void deallocate(T* p, std::size_t n) { std::allocator().deallocate(p, = n); } }; template struct wrap { T t; }; template void do_adl(T&) { } void test_pr113841() { using Tr =3D std::char_traits; using test_type =3D std::basic_string>; std::pair>* h =3D nullptr; do_adl(h); }=