https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122799
Bug ID: 122799
Summary: Error on lambda template parameter defaulted to pack
in fold expression
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eczbek.void at gmail dot com
Target Milestone: ---
https://godbolt.org/z/oaTxn81Ge
Clang is fine with this
```
template<int... x>
void f() {
(..., []<int y = x> {});
}
```
```
<source>: In function 'void f()':
<source>:3:15: error: operand of fold expression has no unexpanded parameter
packs [-Wtemplate-body]
3 | (..., []<int y = x> {});
| ^~~~~~~~~~~~~~~~
```