Skip to content

Commit 0fcd311

Browse files
committed
Forward changes for Motion 3
1 parent 010161f commit 0fcd311

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

source/templates.tex

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@
116116
In a function template declaration, the \grammarterm{unqualified-id} of the
117117
\grammarterm{declarator-id} shall be a name.
118118
\begin{note}
119-
In a class template declaration, if the \grammarterm{class-name}
119+
In a class or variable template declaration, if the
120+
declared name
120121
is a
121122
\grammarterm{simple-template-id},
122123
the declaration declares a partial specialization\iref{temp.spec.partial}.
@@ -135,8 +136,8 @@
135136
\indextext{template name!linkage of}%
136137
A specialization (explicit or implicit) of one template is
137138
distinct from all specializations of any other template.
138-
A template, a template explicit specialization\iref{temp.expl.spec}, and a class
139-
template partial specialization shall not have C language linkage.
139+
A template, an explicit specialization\iref{temp.expl.spec}, and a
140+
partial specialization shall not have C language linkage.
140141
\begin{note}
141142
Default arguments for function templates and for member functions of
142143
class templates are considered definitions for the purpose of template
@@ -149,7 +150,7 @@
149150
name bound in the same scope\iref{basic.scope.scope}, except
150151
that a function template can share a name with non-template
151152
functions\iref{dcl.fct} and/or function templates\iref{temp.over}.
152-
Specializations, including partial specializations\iref{temp.class.spec},
153+
Specializations, including partial specializations\iref{temp.spec.partial},
153154
do not reintroduce or bind names.
154155
Their target scope is the target scope of the primary template,
155156
so all specializations of a template belong to the same scope as it does.
@@ -2162,6 +2163,11 @@
21622163
a \grammarterm{template-argument-list} is
21632164
a partial specialization of
21642165
the template named in the declaration\iref{temp.class.spec}.
2166+
\begin{note}
2167+
A \grammarterm{template-id}
2168+
cannot be the declared name of a primary template declaration.
2169+
However, this syntax is allowed in partial specializations\iref{temp.spec.partial}.
2170+
\end{note}
21652171

21662172
\pnum
21672173
For purposes of name lookup and instantiation,
@@ -3129,23 +3135,21 @@
31293135

31303136
\pnum
31313137
\indextext{specialization!class template partial}%
3132-
A partial specialization of a class template provides an alternative definition
3138+
A partial specialization of a template provides an alternative definition
31333139
of the template that is used instead of the primary definition when the
31343140
arguments in a specialization match those given in the partial
3135-
specialization\iref{temp.class.spec.match}.
3136-
A declaration of the primary template shall precede any specialization of
3141+
specialization\iref{temp.spec.partial.match}.
3142+
A declaration of the primary template shall precede any partial specialization of
31373143
that template.
3138-
A partial specialization shall be reachable from any use of a class template
3144+
A partial specialization shall be reachable from any use of a template
31393145
specialization that would make use of the partial specialization as the result of
31403146
an implicit or explicit instantiation; no diagnostic is required.
31413147

31423148
\pnum
31433149
Two partial specialization declarations declare the same entity
31443150
if they are partial specializations of the same template and have equivalent
31453151
\grammarterm{template-head}s and template argument lists\iref{temp.over.link}.
3146-
Each class template partial specialization is a distinct template and
3147-
definitions shall be provided for the members of a template partial
3148-
specialization\iref{temp.class.spec.mfunc}.
3152+
Each partial specialization is a distinct template.
31493153

31503154
\pnum
31513155
\begin{example}
@@ -3181,10 +3185,10 @@
31813185
\end{example}
31823186

31833187
\pnum
3184-
The template parameters are specified in the angle bracket enclosed list
3188+
The template parameters of a template are specified in the angle bracket enclosed list
31853189
that immediately follows the keyword \keyword{template}.
31863190
The template argument list of a partial specialization is
3187-
the \grammarterm{template-argument-list} of the \grammarterm{ class-name}.
3191+
the \grammarterm{template-argument-list} of the \grammarterm{class-name}.
31883192

31893193
\pnum
31903194
A partial specialization may be declared in any
@@ -3452,7 +3456,6 @@
34523456
\rSec3[temp.spec.partial.member]{Members of class template partial specializations}
34533457

34543458
\pnum
3455-
A class template partial specialization is a distinct template.
34563459
The members of the class template partial specialization are
34573460
unrelated to the members of the primary template.
34583461
Class template partial specialization members that are used in a way that
@@ -4789,8 +4792,8 @@
47894792
the name of the nested class referenced as a member of the
47904793
current instantiation, or
47914794
\item
4792-
in the definition of a partial specialization
4793-
or a member of a partial specialization, the name of
4795+
in the definition of a class template partial specialization
4796+
or a member of a class template partial specialization, the name of
47944797
the class template followed by a template argument list
47954798
equivalent to that of the partial specialization\iref{temp.class.spec}
47964799
enclosed in \tcode{<>} (or an equivalent template alias specialization).

0 commit comments

Comments
 (0)