summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C
blob: cde0c2e5379b25b647ec13de7bf037fc5ec579a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-options -std=c++0x }
// { dg-do run }

auto f = [](int i) { return i+1; };

int g(int i = [] { return 237; }())
{
  return i;
}

int main()
{
  if (f(41) != 42)
    return 1;
  if (g() != 237)
    return 2;
  return 0;
}