1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// PR c++/67846 // { dg-do compile { target c++11 } } class A { void foo () { [=] { return foo; }; // { dg-error "cannot convert" } } void bar () const; void bar () { [=] { return bar; }; // { dg-error "unable to deduce" } } };