| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
int main() { |
| 4 |
int i; |
| 5 |
const char* s; |
| 6 |
[=] () -> void { i; s; i; s; } (); |
| 7 |
|
| 8 |
[] () -> void { i; } (); // { dg-error "" "`i' is not captured" } |
| 9 |
[1] () -> void {} (); // { dg-error "expected identifier" } |
| 10 |
|
| 11 |
return 0; |
| 12 |
} |
| 13 |
|