https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90448
Bug ID: 90448 Summary: [8/9/10 Regression] decltype-based lambda parameter pack is rejected Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: jakub at gcc dot gnu.org, jason at gcc dot gnu.org, webrown.cpp at gmail dot com Target Milestone: --- +++ This bug was initially created as a clone of Bug #90172 +++ g++ rejects the following testcase which is believed to be valid: template<class ... Ts> int fooV(Ts ... ts) { auto L = [](auto ... a) { auto M = [](decltype(a) ... b) -> void { }; return M; }; decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; return 0; } int run2 = fooV("BC", 3, 2.77, 'A', float{}, short{}, unsigned{}); % g++-10.0.0-alpha20190512 -std=c++17 -c mziudrma.cpp mziudrma.cpp: In instantiation of 'int fooV(Ts ...) [with Ts = {const char*, int, double, char, float, short int, unsigned int}]': mziudrma.cpp:13:65: required from here mziudrma.cpp:3:14: error: expansion pattern 'decltype (#'nontype_argument_pack' not supported by dump_expr#<expression error>)' contains no parameter packs 3 | auto M = [](decltype(a) ... b) -> void { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | }; | ~