From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F3203882ACC; Thu, 5 Oct 2023 14:27:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F3203882ACC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696516027; bh=FI54yRIaUsxeSWoJbZMjN3jHS5lXeSHtLDiopfI0ENY=; h=From:To:Subject:Date:From; b=yAbMPZKdUSAwNaCkaj6C56TeAgaa68p6hc/eyPCR/UQxKmWiP3pwIvhoZnPoWcbgO lpZ9+G+Gwe06ng9t0rfHvBDbOrMLTfrhjMHlYwePeHvupQzyS+3fQKy2N8wThinbM7 w1TFvh6eVLJDm4UXhYk8kS/xTqP47NEQ3MvxeMd0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111705] New: [14 Regression] use of concepted copy constructored struct inside a template function messes up Date: Thu, 05 Oct 2023 14:27:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111705 Bug ID: 111705 Summary: [14 Regression] use of concepted copy constructored struct inside a template function messes up Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` template concept c =3D true; template struct ts { template requires(c) ts(const ts&); template requires(!c) ts(const ts&) =3D delete; ts() =3D default; }; using P =3D ts; void (*f)(P); template void f1() {=20=20 P x; f(x); } ``` This gets rejected with the following (bogus) error message: ``` : In substitution of 'template requires !(c) ts::ts(const ts&) [with T1 =3D int]': :21:5: required from here 21 | f(x); | ^ :10:3: required by the constraints of 'template template requires !(c) ts::ts(const ts&)' :9:12: error: satisfaction value of atomic constraint '!(c) [wi= th T1 =3D int]' changed from '' to 'false' 9 | requires(!c) | ~^~~~~~~ :21:5: note: satisfaction value first evaluated to '' from here 21 | f(x); | ^ ``` This was reduced from PR 111703 (but is different since this was accepted before in GCC 13)=