In qualified function calls, the name to be resolved is an
id-expression
and is preceded by an
->
or
.
operator
. Since the
construct
A->B
is generally equivalent to
(*A).B,
the rest of
[over] assumes, without loss of generality, that all member
function calls have been normalized to the form that uses an
object and the
.
operator
. Furthermore,
[over] assumes that
the
postfix-expression
that is the left operand of the
.
operator
has type “
cv T”
where
T
denotes a class
. The function declarations found by that lookup constitute the set of
candidate functions
. The argument list is the
expression-list
in the call augmented by the addition of the left operand of
the
.
operator in the normalized member function call as the
implied object argument (
[over.match.funcs])
.In unqualified function calls, the name is not qualified by an
->
or
.
operator and has the more general form of a
primary-expression. The name is looked up in the context of the function
call following the normal rules for name lookup
in expressions (
[basic.lookup])
. The function declarations found by that lookup constitute the
set of candidate functions
. Because of the rules for name lookup, the set of candidate functions
consists (1) entirely of non-member functions or (2) entirely of
member functions of some class
T. In case (2), the argument list is the
expression-list
in the call augmented by the addition of an implied object
argument as in a qualified function call
. If the keyword
this is in scope and refers to
class
T,
or a derived class of
T,
then the implied object argument is
(*this). If the keyword
this
is not in
scope or refers to another class, then
a contrived object of type
T
becomes the implied object
argument
.
If the argument list is augmented by a contrived object and overload
resolution selects one of the non-static member functions of
T,
the call is ill-formed
.