From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 852E53858415; Tue, 28 Nov 2023 20:44:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 852E53858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701204267; bh=FVZMAIlD83eswqVbOevdfl5X2uSNUuSC/0jtN0To5Fg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YEUTYmoNy2vhKLwZiHMJl5pIEZbIwIQPAiLiiEX0ppD0ZFdfFU84vzeb3L9CJuIni exNTJ6BU8pz9AhqUqmzs35vQMiL8i2WzRiNpy8/4sFsManArht6hyVvBLCg2BxLD7H RRtOks3I/brRSPS1DFeRv3G8Dvd8BWiDGNaTR8W0= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112749] GCC accepts invalid code in concepts (requires clause incorrectly satisfied) Date: Tue, 28 Nov 2023 20:44:27 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: resolution cc 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112749 Patrick Palka changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE CC| |ppalka at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #1 from Patrick Palka --- Thanks for the bug report, I think this is pretty much a dup of PR102419. GCC is behaving correctly here: the normal form of the constraint C1>= is just 'true (with empty parameter mapping)' which is independent of the temp= late parameter, so the constraint is trivially satisfied for any choice of T. To get the behavior you desire, define C1 in a way that depends on its template parameter e.g. template concept C1 =3D requires { typename T; }; *** This bug has been marked as a duplicate of bug 102419 ***=