| 1 |
// { dg-do assemble } |
| 2 |
struct Fooey { |
| 3 |
void f(char* pX); |
| 4 |
void f(int in); |
| 5 |
void f(float fx); |
| 6 |
void h(double dx); |
| 7 |
}; |
| 8 |
|
| 9 |
void Fooey::f(char*) { } // { dg-message "" } candidate |
| 10 |
void Fooey::f(int) { } // { dg-message "" } candidate |
| 11 |
void Fooey::f(float) { } // { dg-message "" } candidate |
| 12 |
void Fooey::h(double zahl) { } |
| 13 |
|
| 14 |
int main() { |
| 15 |
Fooey Blah; |
| 16 |
void (Fooey::*pointer)(double); |
| 17 |
pointer = &Fooey::f; // { dg-error "" } don't call Fooey::h |
| 18 |
(Blah.*pointer)(42.5); |
| 19 |
return 0; |
| 20 |
} |