Argument-matching conversions occur in the following order:
Match through promotion follows the rules for Integral Promotions and Standard Type Conversions.
You can override an exact match by using an explicit cast. In
the following example, the second call to f() matches with
f(void*):
void f(int); void f(void*); void main() { f(0xaabb); // matches f(int); f((void*) 0xaabb); // matches f(void*) }
The implicit first argument for a nonstatic member function or operator is the this pointer. It refers to the class object for which the member function is called. When you overload a nonstatic member function, the first implicit argument, the this pointer, is matched with the object or pointer used in the call to the member function. User-defined conversions are not applied in this type of argument matching for overloaded functions or operators.
When you call an overloaded member function of class X using
the . (dot) or -> ( arrow) operator, the this pointer has type
X* const. The type of the this pointer for a constant object is
const X* const. The type of the this pointer for a volatile
object is volatile X* const.
Argument Matching in Overloaded
Functions
Trivial Conversions
User-Defined Conversions
The this Pointer
Overloading Functions
Overloading Operators
Dot Operator
Arrow Operator