From 4083dd7dc759365b5428d3b0563148af7c7e0ef3 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 23 Mar 2018 19:50:20 +0100 Subject: [PATCH 1/2] [namespace.udecl] Demote normative duplication to notes 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. --- source/declarations.tex | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index b7e1d5e5e4..555b53d061 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3043,24 +3043,28 @@ \pnum \indextext{overloading!using-declaration and}% +\begin{note} For the purpose of forming a set of candidates during overload resolution, the functions that are introduced by a \grammarterm{using-declaration} into a derived class -are treated as though they were members of the derived class. In -particular, the implicit \tcode{this} parameter shall be treated as if -it were a pointer to the derived class rather than to the base class. +are treated as though they were members of the derived class\iref{class.member.lookup}. In +particular, the implicit object parameter is treated as if +it were a reference to the derived class rather than to the base class\iref{over.match.funcs}. This has no effect on the type of the function, and in all other respects the function remains a member of the base class. -Likewise, constructors that are introduced by a \grammarterm{using-declaration} +\end{note} + +\pnum +Constructors that are introduced by a \grammarterm{using-declaration} are treated as though they were constructors of the derived class when looking up the constructors of the derived class\iref{class.qual} or forming a set of overload candidates~(\ref{over.match.ctor}, \ref{over.match.copy}, \ref{over.match.list}). +\begin{note} If such a constructor is selected to perform the initialization of an object of class type, all subobjects other than the base class from which the constructor originated are implicitly initialized\iref{class.inhctor.init}. -\begin{note} -A member of a derived class is sometimes preferred to a member of a base class +A constructor of a derived class is sometimes preferred to a member of a base class if they would otherwise be ambiguous\iref{over.match.best}. \end{note} From 49d8a4eac2415f3265df5bce9ef3d55e037348d3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 6 Jul 2018 15:43:33 -0700 Subject: [PATCH 2/2] fixup --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index 555b53d061..5e67e2d224 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3064,7 +3064,7 @@ of an object of class type, all subobjects other than the base class from which the constructor originated are implicitly initialized\iref{class.inhctor.init}. -A constructor of a derived class is sometimes preferred to a member of a base class +A constructor of a derived class is sometimes preferred to a constructor of a base class if they would otherwise be ambiguous\iref{over.match.best}. \end{note}