From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC8CA3858D28; Sat, 4 Mar 2023 16:22:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC8CA3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677946965; bh=Shfc1MBcW3GpMkJ4GVrrMbZoa4d4fDQPYTBW1QBAsbk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c4KeTKAI91V8VPEmLXCbKYrDpwYzPdiGsLTfxuGJhEGx3i6va0RChrBLSqrNahRiY XieVAiuEb86t8kj5ISznwT6El6MHV/2KAg+Stz/qKVpXpXYK1xDFCzCmBnn8uR/Jnl /2A9fhWoEivD25VhLES++tMKDZMsHgSeJ0gIX20I= From: "hiraditya at msn dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109017] ICE on unexpanded pack from C++20 explicit-template-parameter lambda syntax Date: Sat, 04 Mar 2023 16:22:45 +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: unknown X-Bugzilla-Keywords: c++-lambda, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hiraditya at msn 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: 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=3D109017 AK changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hiraditya at msn dot com --- Comment #1 from AK --- Example from twitter: https://twitter.com/seanbax/status/1631689332007337985 which had discussion on similar bug. ``` template struct outer1_t { void g() { // Compiles for mysterious reasons. int array[] { [](){ int i =3D Is2; return i; }.template operator()() ... }; } }; int main() { // Compiles OKAY when this is commented out. // ICEs when it's compiled. outer1_t<1, 5, 10>().g(); } ``` clang issues a compiler error: https://godbolt.org/z/7f6E55svM ``` :6:15: error: initializer contains unexpanded parameter pack 'Is2' int i =3D Is2; ```=