From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 08EAE38582B7; Mon, 7 Aug 2023 14:08:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08EAE38582B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691417299; bh=H1axeHsI67eOKBqnGJN39XnaWeQm4a6/23awLUCQdmk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OKQGFJeHB/6jCXpiF5kreVzMpHIKw5XfFxe60C6cO68gCqMDObfkK/XbFuCx+1Rko T/5hCfHI8azJ0dkYuu/IXAvystrCQ0nTzDy/5ywabPkGW9vkxTHUiJ9HTWn7MDlEH5 gMmLO6qIB9k0BkUgZBuYBybCEV30kY+OHji7Qcz0= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110853] [c++-concepts] Bad interaction between deduction guide with decay and constraints Date: Mon, 07 Aug 2023 14:08:18 +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: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D110853 Patrick Palka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #1 from Patrick Palka --- Since as you mention a member function body is a complete-class context, libstdc++'s std::pair implementation strategy does seem non-conforming in t= his case. Clang seems to not propagate constructor constraints to the implicit deduct= ion guide, according to the following example, and is probably the reason why it accepts your reduced example. template struct A { A(T) requires false; // #1 A(...); // #2 }; auto a =3D A(0); // GCC rejects, Clang incorrectly(?) selects #2 with T=3Di= nt.=