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