https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85305
Bug ID: 85305 Summary: Parameter pack expression in lambda capture list fails as part of a fold expression Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vittorio.romeo at outlook dot com Target Milestone: --- The following code snippet... template <int... Is> void foo() { ([i = Is]{}(), ...); } ...does not compile on gcc trunk 20180408 with the following error: <source>: In function 'void foo()': <source>:4:11: error: parameter packs not expanded with '...': ([i = Is]{}(), ...); ^~ <source>:4:11: note: 'Is' <source>:4:16: error: operand of fold expression has no unexpanded parameter packs ([i = Is]{}(), ...); ~~~~~~~~~~^~ Live example on godbolt.org: https://godbolt.org/g/YBk6L6