A static function member of a class is simply a regular function in the class's namespace:
Static members of a class are not associated with the objects of the class: they are independent objects with static storage duration or regular functions defined in namespace scope, only once in the program.
In your example, the type of
A::f1 would be
void(A*) and the type of
A::f2 would be
void(A&). Notably, static functions do not need an instance to be called.
Alternatively, non-static member functions do require an instance to be called. You would have to use pointers to class members. In your example, you would use
&A::f2 and their types would be
(void)A::*f2(A&) respectively. If pointers to member functions were treated as regular function pointers, how would they be called? They would need an object instance for the
this pointer to point to.
You can convert a pointer to a member function to an object that overloads the
() operator and behaves like a function (AKA a functor) using std::bind:
std::bind(&A::f1, &a); // &a is the value of this
However, functors do not have the same type as function pointers. I recommend using
std::function in the
functional header file instead of function pointers because they accommodate for functors.
(See http://en.cppreference.com/w/cpp/language/pointer for more information.)