1 // PR c++/56901 2 // { dg-require-effective-target c++11 } 3 4 template <typename> foo_impl()5 void foo_impl() 6 { 7 int data; 8 auto L = [&](){ return data; }; 9 [&](){ L(); }(); 10 [&L](){ L(); }(); 11 } 12 foo()13 void foo() 14 { 15 foo_impl<int>(); 16 } 17