|
3043 | 3043 |
|
3044 | 3044 | \pnum
|
3045 | 3045 | \indextext{overloading!using-declaration and}%
|
| 3046 | +\begin{note} |
3046 | 3047 | For the purpose of forming a set of candidates during overload resolution,
|
3047 | 3048 | the functions that are
|
3048 | 3049 | introduced by a \grammarterm{using-declaration} into a derived class
|
3049 |
| -are treated as though they were members of the derived class. In |
3050 |
| -particular, the implicit \tcode{this} parameter shall be treated as if |
3051 |
| -it were a pointer to the derived class rather than to the base class. |
| 3050 | +are treated as though they were members of the derived class\iref{class.member.lookup}. In |
| 3051 | +particular, the implicit object parameter is treated as if |
| 3052 | +it were a reference to the derived class rather than to the base class\iref{over.match.funcs}. |
3052 | 3053 | This has no effect on the type of the function, and in all other
|
3053 | 3054 | respects the function remains a member of the base class.
|
3054 |
| -Likewise, constructors that are introduced by a \grammarterm{using-declaration} |
| 3055 | +\end{note} |
| 3056 | + |
| 3057 | +\pnum |
| 3058 | +Constructors that are introduced by a \grammarterm{using-declaration} |
3055 | 3059 | are treated as though they were constructors of the derived class
|
3056 | 3060 | when looking up the constructors of the derived class\iref{class.qual}
|
3057 | 3061 | or forming a set of overload candidates~(\ref{over.match.ctor}, \ref{over.match.copy}, \ref{over.match.list}).
|
| 3062 | +\begin{note} |
3058 | 3063 | If such a constructor is selected to perform the initialization
|
3059 | 3064 | of an object of class type, all subobjects other than the base class
|
3060 | 3065 | from which the constructor originated
|
3061 | 3066 | are implicitly initialized\iref{class.inhctor.init}.
|
3062 |
| -\begin{note} |
3063 |
| -A member of a derived class is sometimes preferred to a member of a base class |
| 3067 | +A constructor of a derived class is sometimes preferred to a member of a base class |
3064 | 3068 | if they would otherwise be ambiguous\iref{over.match.best}.
|
3065 | 3069 | \end{note}
|
3066 | 3070 |
|
|
0 commit comments