From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E749B3858C52; Tue, 13 Jun 2023 01:49:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E749B3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686620942; bh=ucZ34hXQ0b5O60GmluL6vPcdSTNkfhwP0bBRT5FQQS8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W3ENfRcqwP5bphLSwvYnWws60pM7OSzl8+y/FPqyQlbbI52Id4kG/kYd/QfBDiypp wp2aJL7MdU2m5syVJzJHS5NJws9PXs/GP8ivO/Zha/zZZ/sy6xRufzImysWWE8YEXv nFWGiGYxJGcG9KKCcjN9pN/OCWZgrXoq0iBB7WdI= From: "danakj at orodu dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103760] Invalid expression inside lambda inside compound requirement causes an error instead of concept satisfaction failure Date: Tue, 13 Jun 2023 01:49:00 +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: 10.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: danakj at orodu dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D103760 danakj at orodu dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danakj at orodu dot net --- Comment #7 from danakj at orodu dot net --- MSVC and Clang both accept this code, which GCC rejects. Is it the same iss= ue and GCC is compliant here? ``` #include template concept C =3D requires() { { [](T t) constexpr { t.foo(1); }() }; }; void bad_call(const char*); struct Foo { consteval void foo(int i) { if (i > 0) { bad_call("positive_value"); } } }; static_assert(!C); ``` https://godbolt.org/z/bdrPve4rT=