From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE77B3836C21; Mon, 1 Feb 2021 17:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE77B3836C21 From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96840] [11 Regression] Recursive substitution in constrained commutative operator Date: Mon, 01 Feb 2021 17:58:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 17:58:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96840 Patrick Palka changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|WAITING |RESOLVED --- Comment #3 from Patrick Palka --- With the above patch we now detect and diagnose the self-recursive satisfac= tion in the testcase: 96840.C: In substitution of =E2=80=98template requires C= void operator*(T, Int) [with T =3D int]=E2=80=99: 96840.C:1:64: required by substitution of =E2=80=98template req= uires C void operator*(Int, T) [with T =3D int]=E2=80=99 96840.C:6:28: required from here 96840.C:1:37: required for the satisfaction of =E2=80=98C=E2=80= =99 [with T =3D Int; Rep =3D int] 96840.C:1:41: in requirements with =E2=80=98T t=E2=80=99, =E2=80=98U u=E2= =80=99 [with U =3D int; T =3D Int] 96840.C:1:41: error: satisfaction of atomic constraint =E2=80=98requires(T = t, U u) {t * u;} [with U =3D Rep; T =3D T]=E2=80=99 depends on itself 1 | template concept C =3D requires(T t, U u) { t * = u; }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~ So I suppose we can mark this PR as resolved.=