aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
blob: 05fadf5d0478ca13c0380258e5e9f05a5ba43644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/56901
// { dg-require-effective-target c++11 }

template <typename>
void foo_impl()
{
  int data;
  auto L = [&](){ return data; };
  [&](){ L(); }();
  [&L](){ L(); }();
}

void foo()
{
  foo_impl<int>();
}