Template:cpp/invoke r

Let's refer to as, , ..., , where  is


 * If is pointer to a member function of class, then it is called. The return value of  is returned. Effectively, the following code is executed:
 * if the type of is either, reference to  or reference to type derived from.
 * otherwise.


 * If and  is pointer to a member data object of a class, then its value is returned. Effectively, the following code is executed:
 * if and the type of  is either, reference to  or reference to type derived from.
 * otherwise.


 * is called as a pointer to a non-member function in all other cases. The return value of is returned. Effectively,  is executed.