summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C
blob: b6972896ecbf9922682276039c213c95af452895 (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/56464
// { dg-do run { target c++11 } }

struct bug { bug*a = [&]{ return [=]{return this;}(); }(); }; // { dg-warning "implicit capture" "" { target c++2a } }
int main()
{
  bug b;
  if (b.a != &b)
    __builtin_abort ();
}