blob: 538dd375362b42b00b63134827a4b02f75e9cbba [file] [log] [blame]
// PR c++/66999 - 'this' captured by reference.
// { dg-do compile { target c++11 } }
struct X {
void bar (int n)
{
auto l1 = [&this] { }; // { dg-error ".this. cannot be captured by reference" }
auto l2 = [=, &this] { }; // { dg-error ".this. cannot be captured by reference" }
}
};