tmp/tmp6enq5ys5/{from.md → to.md}
RENAMED
|
@@ -17,37 +17,37 @@ These represent two syntactic subcategories of function calls: qualified
|
|
| 17 |
function calls and unqualified function calls.
|
| 18 |
|
| 19 |
In qualified function calls, the name to be resolved is an
|
| 20 |
*id-expression* and is preceded by an `->` or `.` operator. Since the
|
| 21 |
construct `A->B` is generally equivalent to `(*A).B`, the rest of
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
In unqualified function calls, the name is not qualified by an `->` or
|
| 36 |
`.` operator and has the more general form of a *primary-expression*.
|
| 37 |
The name is looked up in the context of the function call following the
|
| 38 |
-
normal rules for name lookup in
|
| 39 |
function declarations found by that lookup constitute the set of
|
| 40 |
candidate functions. Because of the rules for name lookup, the set of
|
| 41 |
candidate functions consists (1) entirely of non-member functions or (2)
|
| 42 |
entirely of member functions of some class `T`. In case (1), the
|
| 43 |
argument list is the same as the *expression-list* in the call. In case
|
| 44 |
(2), the argument list is the *expression-list* in the call augmented by
|
| 45 |
the addition of an implied object argument as in a qualified function
|
| 46 |
-
call. If the keyword `this`
|
| 47 |
class `T`, or a derived class of `T`, then the implied object argument
|
| 48 |
is `(*this)`. If the keyword `this` is not in scope or refers to another
|
| 49 |
class, then a contrived object of type `T` becomes the implied object
|
| 50 |
-
argument[^4]
|
| 51 |
and overload resolution selects one of the non-static member functions
|
| 52 |
of `T`, the call is ill-formed.
|
| 53 |
|
|
|
|
| 17 |
function calls and unqualified function calls.
|
| 18 |
|
| 19 |
In qualified function calls, the name to be resolved is an
|
| 20 |
*id-expression* and is preceded by an `->` or `.` operator. Since the
|
| 21 |
construct `A->B` is generally equivalent to `(*A).B`, the rest of
|
| 22 |
+
[[over]] assumes, without loss of generality, that all member function
|
| 23 |
+
calls have been normalized to the form that uses an object and the `.`
|
| 24 |
+
operator. Furthermore, [[over]] assumes that the *postfix-expression*
|
| 25 |
+
that is the left operand of the `.` operator has type “cv `T`” where `T`
|
| 26 |
+
denotes a class.[^3] Under this assumption, the *id-expression* in the
|
| 27 |
+
call is looked up as a member function of `T` following the rules for
|
| 28 |
+
looking up names in classes [[class.member.lookup]]. The function
|
| 29 |
+
declarations found by that lookup constitute the set of candidate
|
| 30 |
+
functions. The argument list is the *expression-list* in the call
|
| 31 |
+
augmented by the addition of the left operand of the `.` operator in the
|
| 32 |
+
normalized member function call as the implied object argument
|
| 33 |
+
[[over.match.funcs]].
|
| 34 |
|
| 35 |
In unqualified function calls, the name is not qualified by an `->` or
|
| 36 |
`.` operator and has the more general form of a *primary-expression*.
|
| 37 |
The name is looked up in the context of the function call following the
|
| 38 |
+
normal rules for name lookup in expressions [[basic.lookup]]. The
|
| 39 |
function declarations found by that lookup constitute the set of
|
| 40 |
candidate functions. Because of the rules for name lookup, the set of
|
| 41 |
candidate functions consists (1) entirely of non-member functions or (2)
|
| 42 |
entirely of member functions of some class `T`. In case (1), the
|
| 43 |
argument list is the same as the *expression-list* in the call. In case
|
| 44 |
(2), the argument list is the *expression-list* in the call augmented by
|
| 45 |
the addition of an implied object argument as in a qualified function
|
| 46 |
+
call. If the keyword `this` [[class.this]] is in scope and refers to
|
| 47 |
class `T`, or a derived class of `T`, then the implied object argument
|
| 48 |
is `(*this)`. If the keyword `this` is not in scope or refers to another
|
| 49 |
class, then a contrived object of type `T` becomes the implied object
|
| 50 |
+
argument.[^4] If the argument list is augmented by a contrived object
|
| 51 |
and overload resolution selects one of the non-static member functions
|
| 52 |
of `T`, the call is ill-formed.
|
| 53 |
|