From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A37303861894; Thu, 5 Oct 2023 12:40:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A37303861894 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696509610; bh=BWQwutpK1UwMoGCAR7FF9iSzXSRtlVJS0SYOXK+9tGg=; h=From:To:Subject:Date:From; b=gMrolSPDES9hb4TF8Bl+jB82r70HSKvdBxxw+8hwl23yIr1G390CP24S7898qRwhr MT8EW91ECqSkzflID1nk+OdCdZ+ekWBE7JOOWAhFQbx3LJJdrwNUBICOFmvhJcIhjx bvWuWn/QMPw7paDQsebnA9VxwtHFQa9T5Q1IJAUQ= From: "watanabemakoto.math at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111703] New: [C++20]Compiler fails when using generic lambda in specific situation Date: Thu, 05 Oct 2023 12:40:10 +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: watanabemakoto.math 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=3D111703 Bug ID: 111703 Summary: [C++20]Compiler fails when using generic lambda in specific situation Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: watanabemakoto.math at gmail dot com Target Milestone: --- Consider the example: ``` #include using P =3D std::pair; void (*f)(P); int main(){ [](auto) { P x; f(x); }; } ``` GCC 13.2.0 fails to compile the example. Compile option is `-std=3Dc++20` . Godbolt playground: https://godbolt.org/z/nPMb38ond=