https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103428
Bug ID: 103428 Summary: Parameter packs not expanded with local struct in lambda Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- gcc-10 rejects this well-formed code. Fortunately, gcc-11.1 accepts it, however, gcc-11.2 rejected it again. template<class... Ts> auto f(Ts... args) { ([]() { struct B : decltype(args) { }; }, ...); }; int main() { f([]{}); } https://godbolt.org/z/rYhnKee7M