Rebase.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-auto3.C
blob013ed5264eaf3c8073c2fb22d727e2a022d2185a
1 // PR c++/57526
2 // { dg-require-effective-target c++11 }
4 template<class T>
5 struct A
7   void bar( ) { }
9   void foo( )
10   {
11     auto* this_ptr = this;
12     auto lc = [&]( )
13       {
14         this_ptr->bar();
15       };
16     lc();
17   }
20 int main()
22   A<int> a;
23   a.foo();