summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch2.C
blob: 677f3056bf8be8d7dce1fab810791b27a4aaf59f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/82728
// { dg-do compile { target c++11 } }

void
foo ()
{
  const int i = 1;

  [=]()
    {
      switch (0)
	{
	case i:
	  break;
	}
      static_assert (i, "i");
    };
}