https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100035
Bug ID: 100035
Summary: Parameter packs not expanded with local variable in
lambda
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
https://godbolt.org/z/ss9bjYvc1
template <class... Ts>
auto f(Ts...) {
([] { Ts x = 0; }, ...);
}
gcc rejects with:
<source>: In function 'auto f(Ts ...)':
<source>:3:4: error: operand of fold expression has no unexpanded parameter
packs
3 | ([] { Ts x = 0; }, ...);
| ^~~~~~~~~~~~~~~~