The fact that the function is overloaded is not really relevant. The real problem here is the difference between a function pointer and a pointer-member-pointer. I will give some examples without overloading.
Decision. Or remove static to define them as member functions. Or replace ns::ClassA::*ClassA_foo1 with *ClassA_foo1 . I think you want the last one. (But I really recommend that you use typedef , as others have already pointed out).
Consider these two:
namespace ns { struct ClassA { static ClassA foo(long); }; }
and
namespace ns { struct ClassA { ClassA foo(long); }; }
In the first case, foo is static and therefore is a typical function and can be stored in a function pointer:
ns::ClassA (ClassA_foo1)(long) = &ns::ClassA::foo;
If you remove static , then this is no longer a function, it is a member function. And pointers to function elements are different from pointers to functions, they must be executed with an object, which will be the this object on which the method is called.
The function pointer type includes the return type and the parameter type. But the type of the member-pointer function should also include the type of the this object - you do not expect that you can start the method from Circle for an object of type BankAccount .
Function pointer declaration:
ReturnType (*variable_name) (PARAM1, PARAM2)
Declaring a member pointer function:
ReturnType (ThisObjectType::*variable_name) (PARAM1, PARAM2)
This last line is interesting. At first glance, you might think that R (A::*v) (P1,P2) declares a normal function pointer and places the resulting variable v in area A But this is not so. Instead, it defines a member pointer function that works with objects of type A