| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
void bar(); |
| 4 |
void bar(int); |
| 5 |
|
| 6 |
template <typename... Args> |
| 7 |
void foo(Args... args) { |
| 8 |
#if __cpp_init_captures >= 201803 |
| 9 |
auto f = [...xs=args]{ |
| 10 |
bar(xs...); |
| 11 |
}; |
| 12 |
#endif |
| 13 |
} |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
foo(); |
| 18 |
foo(1); |
| 19 |
} |