From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B00303861800; Wed, 14 Feb 2024 22:35:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B00303861800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707950144; bh=YeVZOV+b1PNPFBnq2jAf7/EkdD5vksIyJdYErkWMiP8=; h=From:To:Subject:Date:From; b=n4cl1gdl3slsUtRmEQWgkdlGfsm8BvMz1BmL1R+Rtra0TVGowydagXL5cLUHmeSos 1l+zbsND837l7BeuMrQbYX5Eevx6ydllOsgKa/l1qi2uJ+l2jJbaJkr/VXi1+YaSzC cFt0hL8tqI0iLp1RxjrmA3ug7d8PmWjfwd86cqck= From: "gieseanw+gcc at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113925] New: static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected Date: Wed, 14 Feb 2024 22:35:44 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gieseanw+gcc at gmail dot com 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 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=3D113925 Bug ID: 113925 Summary: static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gieseanw+gcc at gmail dot com Target Milestone: --- template struct b{}; static_assert(requires { b<([]()consteval{ return true; }())>{}; }); In gcc 13.2 and 14.0.1 this produces: error: template argument 1 is invalid 3 | static_assert(requires { b<([]()consteval{ return true; }())>{}; }); | ^ Godbolt: https://godbolt.org/z/7dacc7rKr StackOverflow: https://stackoverflow.com/a/77996234/27678=