// PR c++/61151 // { dg-do compile { target c++11 } } struct B { void foo () {} }; template struct A { template void bar (); B a; }; template template void A::bar () { auto f = [this] () { auto g = [=] () { a.foo (); }; g (); }; f (); } int main () { A a; a.bar (); }