aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C
blob: aaa80f47000602ae89a4ea23f2ce1e46f1e02287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/53158
// { dg-do compile { target c++11 } }

int main()
{
  auto a = []() { return true; };
  auto b = []() { return a(); };  // { dg-error "'a' is not captured" }
  int c, d;
  while (b() && c < d) // { dg-error "could not convert" }
    {
    }
}