Skip to content

Commit e55ec5d

Browse files
committed
Forward changes for Motion 3, resolving P2096R2/P1787R6 conflicts
Move definition and constraint from [temp.spec.partial.general] to [temp.decls.general]
1 parent ce93b05 commit e55ec5d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

source/templates.tex

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +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}
120-
is a
121-
\grammarterm{simple-template-id},
122-
the declaration declares a partial specialization\iref{temp.spec.partial}.
119+
A class or variable template declaration of a \grammarterm{simple-template-id}
120+
declares a partial specialization\iref{temp.spec.partial}.
123121
\end{note}
124122

125123
\pnum
@@ -135,8 +133,8 @@
135133
\indextext{template name!linkage of}%
136134
A specialization (explicit or implicit) of one template is
137135
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.
136+
A template, an explicit specialization\iref{temp.expl.spec}, and a
137+
partial specialization shall not have C language linkage.
140138
\begin{note}
141139
Default arguments for function templates and for member functions of
142140
class templates are considered definitions for the purpose of template
@@ -2152,6 +2150,11 @@
21522150

21532151
\rSec2[temp.decls.general]{General}
21542152

2153+
\pnum
2154+
The template parameters of a template are specified in
2155+
the angle bracket enclosed list
2156+
that immediately follows the keyword \keyword{template}.
2157+
21552158
\pnum
21562159
A \defnadj{primary}{template} declaration is one
21572160
in which the name of the template is not followed by
@@ -2160,8 +2163,9 @@
21602163
the template argument list of its \grammarterm{template-head}\iref{temp.arg}.
21612164
A template declaration in which the name of the template is followed by
21622165
a \grammarterm{template-argument-list} is
2163-
a partial specialization of
2164-
the template named in the declaration\iref{temp.spec.partial}.
2166+
a partial specialization\iref{temp.spec.partial} of
2167+
the template named in the declaration,
2168+
which shall be a class or variable template.
21652169

21662170
\pnum
21672171
For purposes of name lookup and instantiation,
@@ -3129,23 +3133,22 @@
31293133

31303134
\pnum
31313135
\indextext{specialization!class template partial}%
3132-
A partial specialization of a class template provides an alternative definition
3136+
A partial specialization of a template provides an alternative definition
31333137
of the template that is used instead of the primary definition when the
31343138
arguments in a specialization match those given in the partial
31353139
specialization\iref{temp.spec.partial.match}.
3136-
A declaration of the primary template shall precede any specialization of
3140+
A declaration of the primary template shall precede
3141+
any partial specialization of
31373142
that template.
3138-
A partial specialization shall be reachable from any use of a class template
3143+
A partial specialization shall be reachable from any use of a template
31393144
specialization that would make use of the partial specialization as the result of
31403145
an implicit or explicit instantiation; no diagnostic is required.
31413146

31423147
\pnum
31433148
Two partial specialization declarations declare the same entity
31443149
if they are partial specializations of the same template and have equivalent
31453150
\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}.
3151+
Each partial specialization is a distinct template.
31493152

31503153
\pnum
31513154
\begin{example}
@@ -3181,10 +3184,8 @@
31813184
\end{example}
31823185

31833186
\pnum
3184-
The template parameters are specified in the angle bracket enclosed list
3185-
that immediately follows the keyword \keyword{template}.
31863187
The template argument list of a partial specialization is
3187-
the \grammarterm{template-argument-list} of the \grammarterm{class-name}.
3188+
the \grammarterm{template-argument-list} following the name of the template.
31883189

31893190
\pnum
31903191
A partial specialization may be declared in any
@@ -3452,7 +3453,6 @@
34523453
\rSec3[temp.spec.partial.member]{Members of class template partial specializations}
34533454

34543455
\pnum
3455-
A class template partial specialization is a distinct template.
34563456
The members of the class template partial specialization are
34573457
unrelated to the members of the primary template.
34583458
Class template partial specialization members that are used in a way that
@@ -4789,8 +4789,8 @@
47894789
the name of the nested class referenced as a member of the
47904790
current instantiation, or
47914791
\item
4792-
in the definition of a partial specialization
4793-
or a member of a partial specialization, the name of
4792+
in the definition of a class template partial specialization
4793+
or a member of a class template partial specialization, the name of
47944794
the class template followed by a template argument list
47954795
equivalent to that of the partial specialization\iref{temp.spec.partial}
47964796
enclosed in \tcode{<>} (or an equivalent template alias specialization).

0 commit comments

Comments
 (0)