summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C
blob: 15f1d9034a33ef84ff3195089ae4cc65e6a4bd10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/49598
// { dg-options -std=c++0x }
// { dg-do run }

int
main()
{
  int i = 10;
  int& ir = i;

  if ([=]{ return ir; }() != 10)
    return 1;
}