summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const11.C
blob: 26af75bf1321552ab593e55b4738eef762dca4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/108975
// { dg-do compile { target c++11 } }

template<class T>
void f() {
  constexpr int dim = 1;
  auto l = [&] {
    int n[dim * 1];
  };
  // In f<int>, we shouldn't actually capture dim.
  static_assert (sizeof(l) == 1, "");
}

template void f<int>();