Skip to content

Commit d3f80a4

Browse files
jensmaurerzygoloid
authored andcommitted
[namespace.udecl] Demote normative duplication to notes (#1976)
The effects of using-declarations naming member functions are discussed in other parts of the standard. The effects of initializing with an inherited constructor are discussed elsewhere, too.
1 parent 0775893 commit d3f80a4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

source/declarations.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7465,24 +7465,28 @@
74657465

74667466
\pnum
74677467
\indextext{overloading!using-declaration and}%
7468+
\begin{note}
74687469
For the purpose of forming a set of candidates during overload resolution,
74697470
the functions that are
74707471
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}.
74747475
This has no effect on the type of the function, and in all other
74757476
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}
74777481
are treated as though they were constructors of the derived class
74787482
when looking up the constructors of the derived class\iref{class.qual}
74797483
or forming a set of overload candidates~(\ref{over.match.ctor}, \ref{over.match.copy}, \ref{over.match.list}).
7484+
\begin{note}
74807485
If such a constructor is selected to perform the initialization
74817486
of an object of class type, all subobjects other than the base class
74827487
from which the constructor originated
74837488
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
74867490
if they would otherwise be ambiguous\iref{over.match.best}.
74877491
\end{note}
74887492

0 commit comments

Comments
 (0)