blob: 371d03f941f87624fe88b8bbdfca1b4c82ff5335 [file] [log] [blame]
// PR c++/47795
// { dg-do compile { target c++11 } }
class Klass
{
unsigned int local;
public:
bool dostuff();
};
bool Klass::dostuff()
{
auto f = []() -> bool {
if (local & 1) { return true; } // { dg-error "not captured|non-static" }
return false;
};
return true;
}
int main()
{
Klass c;
return 0;
}