|
7465 | 7465 |
|
7466 | 7466 | \pnum
|
7467 | 7467 | \indextext{overloading!using-declaration and}%
|
| 7468 | +\begin{note} |
7468 | 7469 | For the purpose of forming a set of candidates during overload resolution,
|
7469 | 7470 | the functions that are
|
7470 | 7471 | introduced by a \grammarterm{using-declaration} into a derived class
|
7471 |
| -are treated as though they were members of the derived class. In |
7472 |
| -particular, the implicit \tcode{this} parameter shall be treated as if |
7473 |
| -it were a pointer to the derived class rather than to the base class. |
| 7472 | +are treated as though they were members of the derived class\iref{class.member.lookup}. In |
| 7473 | +particular, the implicit object parameter is treated as if |
| 7474 | +it were a reference to the derived class rather than to the base class\iref{over.match.funcs}. |
7474 | 7475 | This has no effect on the type of the function, and in all other
|
7475 | 7476 | respects the function remains a member of the base class.
|
7476 |
| -Likewise, constructors that are introduced by a \grammarterm{using-declaration} |
| 7477 | +\end{note} |
| 7478 | + |
| 7479 | +\pnum |
| 7480 | +Constructors that are introduced by a \grammarterm{using-declaration} |
7477 | 7481 | are treated as though they were constructors of the derived class
|
7478 | 7482 | when looking up the constructors of the derived class\iref{class.qual}
|
7479 | 7483 | or forming a set of overload candidates~(\ref{over.match.ctor}, \ref{over.match.copy}, \ref{over.match.list}).
|
| 7484 | +\begin{note} |
7480 | 7485 | If such a constructor is selected to perform the initialization
|
7481 | 7486 | of an object of class type, all subobjects other than the base class
|
7482 | 7487 | from which the constructor originated
|
7483 | 7488 | are implicitly initialized\iref{class.inhctor.init}.
|
7484 |
| -\begin{note} |
7485 |
| -A member of a derived class is sometimes preferred to a member of a base class |
| 7489 | +A constructor of a derived class is sometimes preferred to a constructor of a base class |
7486 | 7490 | if they would otherwise be ambiguous\iref{over.match.best}.
|
7487 | 7491 | \end{note}
|
7488 | 7492 |
|
|
0 commit comments