Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/lambda-init3.C

raw
1 // N3648: capture init at non-block scope
2 // { dg-options "-w" }
3 // { dg-do run { target c++14 } }
4
5 int i = 42;
6 int j = [x=i]{ return x; }();
7
8 int main()
9 {
10 if (j != 42) __builtin_abort();
11 }