From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F9A63858C30; Sun, 9 Jul 2023 13:47:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F9A63858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688910465; bh=jwQwMiB1AxBOS9NKtn7w6nYeAcYWBPpoHoiZ/eaOI/o=; h=From:To:Subject:Date:From; b=DzVHcw5Oe/CKdu7KExXDqzpbceGrmfH8ZBJri01kFZx+tc2Zpy30wSyir4q6J4Nao F86FNVmXWHAnvVGaaU7+3tkJCqA5YCGFiJJOA2Hb5cM8ipWr1aYS6yL8z8PQ3t88p+ 5Qs1QBF2NCG6ZZS7CyZrVkS3Mwzf/qptFBxGMsIQ= From: "ted at lyncon dot se" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110604] New: template argument deduction failed with decltype(lambda) Date: Sun, 09 Jul 2023 13:47:45 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: ted at lyncon dot se 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=3D110604 Bug ID: 110604 Summary: template argument deduction failed with decltype(lambda) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ted at lyncon dot se Target Milestone: --- Compiling this in C++20 mode on trunk (https://godbolt.org/z/dW5cf3WrK): ``` template struct foo { template void bar() {} }; int main() { [[maybe_unused]] auto v =3D foo(); v.bar<>(); v.bar(); } ``` Results in the following error: ``` : In function 'int main()': :10:12: error: no matching function for call to 'foo::bar<>()' 10 | v.bar<>(); | ~~~~~~~^~ :4:10: note: candidate: 'template void foo< >::bar() [with =3D void]' 4 | void bar() {} | ^~~ :4:10: note: template argument deduction/substitution failed: :11:10: error: no matching function for call to 'foo::bar()' 11 | v.bar(); | ~~~~~^~ :4:10: note: candidate: 'template void foo< >::bar() [with =3D void]' 4 | void bar() {} | ^~~ :4:10: note: template argument deduction/substitution failed: ``` Possibly a duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D1027= 21, but I'm not 100% sure.=