Member function pointer

Viewed 2639

If the following from the C++ FAQ Lite is true: "a function name decays to a pointer to the function" (as an array name decays to a pointer to its first element); why do we have to include the ampersand?

typedef  int (Fred::*FredMemFn)(char x, float y);
FredMemFn p = &Fred::f;

And not just:

typedef  int (Fred::*FredMemFn)(char x, float y);
FredMemFn p = Fred::f;

In the second case Fred::f is a function and can decay to a pointer to that function.

I hope this question is not that stupid.

1 Answers
Related