Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-58566.C

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