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