1 2 3 4 5 6 7 8 9 10
// PR c++/58566 // { dg-do compile { target c++11 } } struct A { int foo() { [this]{ return foo; }; // { dg-error "invalid use of member function|cannot convert" } } };