/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-const2.C
blob9a00e22eef990d70706a6e826b05a00a5adced98
1 // PR c++/67411
2 // { dg-do compile { target c++14 } }
4 template <class T>
5 void f()
7   int i = 42;
8   [=] {
9     const int x = i;
10     [&](auto) {
11       [=] { return x; }();
12     }(1);
13   }();
16 int main()
18   f<int>();