Debian Codegraph @

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

raw
1 // PR c++/108975
2 // { dg-do compile { target c++11 } }
3
4 template<class T>
5 void f() {
6 constexpr int dim = 1;
7 auto l = [&] {
8 int n[dim * 1];
9 };
10 // In f<int>, we shouldn't actually capture dim.
11 static_assert (sizeof(l) == 1, "");
12 }
13
14 template void f<int>();