Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C

raw
1 // PR c++/54276
2 // { dg-do link { target c++11 } }
3
4 template <typename T>
5 void foo(T)
6 {
7 static int x = 1;
8 auto f = [] { return x + 1; };
9 f();
10 }
11
12 int main()
13 {
14 foo(4);
15 }