diff --git a/source/basic.tex b/source/basic.tex index 3815136072..5911a7939b 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -2654,7 +2654,7 @@ \end{itemize} \begin{note} There are other circumstances in which declarations declare the same entity -(\ref{dcl.link}, \ref{temp.type}, \ref{temp.class.spec}). +(\ref{dcl.link}, \ref{temp.type}, \ref{temp.spec.partial}). \end{note} \pnum diff --git a/source/classes.tex b/source/classes.tex index 2e139dda2d..52e7e9849b 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -4423,7 +4423,7 @@ \pnum \begin{note} -A member of a private base class might be inaccessible as inherited, +A member of a private base class can be inaccessible as inherited, but accessible directly. Because of the rules on pointer conversions\iref{conv.ptr} and explicit casts~(\ref{expr.type.conv}, \ref{expr.static.cast}, \ref{expr.cast}), @@ -6755,7 +6755,7 @@ \pnum Access to the deallocation function is checked statically, -even though a different one might actually be executed. +even if a different one is actually executed. \begin{example} For the call on line ``// 1'' above, if diff --git a/source/declarations.tex b/source/declarations.tex index d51f71fc6f..cefffa3c8c 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4687,7 +4687,7 @@ this is the defining declaration\iref{basic.def} of the variable, but the initializing declaration of a non-inline static data member\iref{class.static.data} -might be the declaration within the class definition +can be the declaration within the class definition and not the definition (if any) outside it. \end{note} @@ -6660,7 +6660,7 @@ that is a function template whose first template parameter is a non-type parameter, the initializer is -\tcode{\exposid{e}.get()}. Otherwise, the initializer is \tcode{get(\exposid{e})}, +\tcode{\exposidnc{e}.get()}. Otherwise, the initializer is \tcode{get(\exposid{e})}, where \tcode{get} undergoes argument-dependent lookup\iref{basic.lookup.argdep}. In either case, \tcode{get} is interpreted as a \grammarterm{template-id}. \begin{note} @@ -8090,7 +8090,8 @@ \indextext{class!linkage specification}% A C language linkage is ignored in determining the language linkage of -class members and the +class members, +friend functions with a trailing \grammarterm{requires-clause}, and the function type of class member functions. \begin{example} \begin{codeblock} diff --git a/source/expressions.tex b/source/expressions.tex index 1884f7daa4..d96e8effd0 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1560,7 +1560,7 @@ $H$ shall be equivalent to the \grammarterm{template-head} of $T$\iref{temp.over.link}. \item -Otherwise, $N$ nominates the partial specialization\iref{temp.class.spec} of $T$ +Otherwise, $N$ nominates the partial specialization\iref{temp.spec.partial} of $T$ whose template argument list is equivalent to $A$\iref{temp.over.link}; the program is ill-formed if no such partial specialization exists. \end{itemize} @@ -4368,7 +4368,7 @@ The address of an overload set\iref{over} can be taken only in a context that uniquely determines which function is referred to (see~\ref{over.over}). -Since the context might determine whether the operand is a static or +Since the context can affect whether the operand is a static or non-static member function, the context can also affect whether the expression has type ``pointer to function'' or ``pointer to member function''. diff --git a/source/templates.tex b/source/templates.tex index 6977de459b..4bd8c4b59c 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -116,7 +116,8 @@ In a function template declaration, the \grammarterm{unqualified-id} of the \grammarterm{declarator-id} shall be a name. \begin{note} -In a class template declaration, if the \grammarterm{class-name} +In a class or variable template declaration, if the +declared name is a \grammarterm{simple-template-id}, the declaration declares a partial specialization\iref{temp.spec.partial}. @@ -135,8 +136,8 @@ \indextext{template name!linkage of}% A specialization (explicit or implicit) of one template is distinct from all specializations of any other template. -A template, a template explicit specialization\iref{temp.expl.spec}, and a class -template partial specialization shall not have C language linkage. +A template, an explicit specialization\iref{temp.expl.spec}, and a +partial specialization shall not have C language linkage. \begin{note} Default arguments for function templates and for member functions of class templates are considered definitions for the purpose of template @@ -149,7 +150,7 @@ name bound in the same scope\iref{basic.scope.scope}, except that a function template can share a name with non-template functions\iref{dcl.fct} and/or function templates\iref{temp.over}. -Specializations, including partial specializations\iref{temp.class.spec}, +Specializations, including partial specializations\iref{temp.spec.partial}, do not reintroduce or bind names. Their target scope is the target scope of the primary template, so all specializations of a template belong to the same scope as it does. @@ -2161,7 +2162,7 @@ A template declaration in which the name of the template is followed by a \grammarterm{template-argument-list} is a partial specialization of -the template named in the declaration\iref{temp.class.spec}. +the template named in the declaration\iref{temp.spec.partial}. \pnum For purposes of name lookup and instantiation, @@ -3129,13 +3130,13 @@ \pnum \indextext{specialization!class template partial}% -A partial specialization of a class template provides an alternative definition +A partial specialization of a template provides an alternative definition of the template that is used instead of the primary definition when the arguments in a specialization match those given in the partial -specialization\iref{temp.class.spec.match}. +specialization\iref{temp.spec.partial.match}. A declaration of the primary template shall precede any specialization of that template. -A partial specialization shall be reachable from any use of a class template +A partial specialization shall be reachable from any use of a template specialization that would make use of the partial specialization as the result of an implicit or explicit instantiation; no diagnostic is required. @@ -3143,9 +3144,7 @@ Two partial specialization declarations declare the same entity if they are partial specializations of the same template and have equivalent \grammarterm{template-head}s and template argument lists\iref{temp.over.link}. -Each class template partial specialization is a distinct template and -definitions shall be provided for the members of a template partial -specialization\iref{temp.class.spec.mfunc}. +Each partial specialization is a distinct template. \pnum \begin{example} @@ -3181,10 +3180,10 @@ \end{example} \pnum -The template parameters are specified in the angle bracket enclosed list +The template parameters of a template are specified in the angle bracket enclosed list that immediately follows the keyword \keyword{template}. The template argument list of a partial specialization is -the \grammarterm{template-argument-list} of the \grammarterm{ class-name}. +the \grammarterm{template-argument-list} of the \grammarterm{class-name}. \pnum A partial specialization may be declared in any @@ -3452,7 +3451,6 @@ \rSec3[temp.spec.partial.member]{Members of class template partial specializations} \pnum -A class template partial specialization is a distinct template. The members of the class template partial specialization are unrelated to the members of the primary template. Class template partial specialization members that are used in a way that @@ -4789,10 +4787,10 @@ the name of the nested class referenced as a member of the current instantiation, or \item -in the definition of a partial specialization -or a member of a partial specialization, the name of +in the definition of a class template partial specialization +or a member of a class template partial specialization, the name of the class template followed by a template argument list -equivalent to that of the partial specialization\iref{temp.class.spec} +equivalent to that of the partial specialization\iref{temp.spec.partial} enclosed in \tcode{<>} (or an equivalent template alias specialization). \end{itemize} @@ -5724,7 +5722,7 @@ } \end{codeblock} \end{example} -If the template selected for the specialization\iref{temp.class.spec.match} +If the template selected for the specialization\iref{temp.spec.partial.match} has been declared, but not defined, at the point of instantiation\iref{temp.point}, the instantiation yields an incomplete class type\iref{basic.types}.