|
3018 | 3018 |
|
3019 | 3019 | \pnum
|
3020 | 3020 | \indextext{overloading!using-declaration and}%
|
| 3021 | +\begin{note} |
3021 | 3022 | For the purpose of forming a set of candidates during overload resolution,
|
3022 | 3023 | the functions that are
|
3023 | 3024 | introduced by a \grammarterm{using-declaration} into a derived class
|
3024 |
| -are treated as though they were members of the derived class. In |
3025 |
| -particular, the implicit \tcode{this} parameter shall be treated as if |
3026 |
| -it were a pointer to the derived class rather than to the base class. |
| 3025 | +are treated as though they were members of the derived class\iref{class.member.lookup}. In |
| 3026 | +particular, the implicit object parameter is treated as if |
| 3027 | +it were a reference to the derived class rather than to the base class\iref{over.match.funcs}. |
3027 | 3028 | This has no effect on the type of the function, and in all other
|
3028 | 3029 | respects the function remains a member of the base class.
|
3029 |
| -Likewise, constructors that are introduced by a \grammarterm{using-declaration} |
| 3030 | +A member of a derived class is sometimes preferred to a member of a base class |
| 3031 | +if they would otherwise be ambiguous\iref{over.match.best}. |
| 3032 | +\end{note} |
| 3033 | + |
| 3034 | +\pnum |
| 3035 | +Constructors that are introduced by a \grammarterm{using-declaration} |
3030 | 3036 | are treated as though they were constructors of the derived class
|
3031 | 3037 | when looking up the constructors of the derived class\iref{class.qual}
|
3032 | 3038 | or forming a set of overload candidates~(\ref{over.match.ctor}, \ref{over.match.copy}, \ref{over.match.list}).
|
| 3039 | +\begin{note} |
3033 | 3040 | If such a constructor is selected to perform the initialization
|
3034 | 3041 | of an object of class type, all subobjects other than the base class
|
3035 | 3042 | from which the constructor originated
|
3036 | 3043 | are implicitly initialized\iref{class.inhctor.init}.
|
3037 |
| -\begin{note} |
3038 |
| -A member of a derived class is sometimes preferred to a member of a base class |
3039 |
| -if they would otherwise be ambiguous\iref{over.match.best}. |
3040 | 3044 | \end{note}
|
3041 | 3045 |
|
3042 | 3046 | \pnum
|
|
0 commit comments