|
116 | 116 | In a function template declaration, the \grammarterm{unqualified-id} of the
|
117 | 117 | \grammarterm{declarator-id} shall be a name.
|
118 | 118 | \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 |
120 | 121 | is a
|
121 | 122 | \grammarterm{simple-template-id},
|
122 | 123 | the declaration declares a partial specialization\iref{temp.spec.partial}.
|
|
135 | 136 | \indextext{template name!linkage of}%
|
136 | 137 | A specialization (explicit or implicit) of one template is
|
137 | 138 | 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. |
140 | 141 | \begin{note}
|
141 | 142 | Default arguments for function templates and for member functions of
|
142 | 143 | class templates are considered definitions for the purpose of template
|
|
149 | 150 | name bound in the same scope\iref{basic.scope.scope}, except
|
150 | 151 | that a function template can share a name with non-template
|
151 | 152 | 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}, |
153 | 154 | do not reintroduce or bind names.
|
154 | 155 | Their target scope is the target scope of the primary template,
|
155 | 156 | so all specializations of a template belong to the same scope as it does.
|
|
2161 | 2162 | A template declaration in which the name of the template is followed by
|
2162 | 2163 | a \grammarterm{template-argument-list} is
|
2163 | 2164 | a partial specialization of
|
2164 |
| -the template named in the declaration\iref{temp.class.spec}. |
| 2165 | +the template named in the declaration\iref{temp.spec.partial}. |
2165 | 2166 |
|
2166 | 2167 | \pnum
|
2167 | 2168 | For purposes of name lookup and instantiation,
|
|
3129 | 3130 |
|
3130 | 3131 | \pnum
|
3131 | 3132 | \indextext{specialization!class template partial}%
|
3132 |
| -A partial specialization of a class template provides an alternative definition |
| 3133 | +A partial specialization of a template provides an alternative definition |
3133 | 3134 | of the template that is used instead of the primary definition when the
|
3134 | 3135 | arguments in a specialization match those given in the partial
|
3135 |
| -specialization\iref{temp.class.spec.match}. |
| 3136 | +specialization\iref{temp.spec.partial.match}. |
3136 | 3137 | A declaration of the primary template shall precede any specialization of
|
3137 | 3138 | that template.
|
3138 |
| -A partial specialization shall be reachable from any use of a class template |
| 3139 | +A partial specialization shall be reachable from any use of a template |
3139 | 3140 | specialization that would make use of the partial specialization as the result of
|
3140 | 3141 | an implicit or explicit instantiation; no diagnostic is required.
|
3141 | 3142 |
|
3142 | 3143 | \pnum
|
3143 | 3144 | Two partial specialization declarations declare the same entity
|
3144 | 3145 | if they are partial specializations of the same template and have equivalent
|
3145 | 3146 | \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}. |
| 3147 | +Each partial specialization is a distinct template. |
3149 | 3148 |
|
3150 | 3149 | \pnum
|
3151 | 3150 | \begin{example}
|
|
3181 | 3180 | \end{example}
|
3182 | 3181 |
|
3183 | 3182 | \pnum
|
3184 |
| -The template parameters are specified in the angle bracket enclosed list |
| 3183 | +The template parameters of a template are specified in the angle bracket enclosed list |
3185 | 3184 | that immediately follows the keyword \keyword{template}.
|
3186 | 3185 | The template argument list of a partial specialization is
|
3187 |
| -the \grammarterm{template-argument-list} of the \grammarterm{ class-name}. |
| 3186 | +the \grammarterm{template-argument-list} of the \grammarterm{class-name}. |
3188 | 3187 |
|
3189 | 3188 | \pnum
|
3190 | 3189 | A partial specialization may be declared in any
|
|
3452 | 3451 | \rSec3[temp.spec.partial.member]{Members of class template partial specializations}
|
3453 | 3452 |
|
3454 | 3453 | \pnum
|
3455 |
| -A class template partial specialization is a distinct template. |
3456 | 3454 | The members of the class template partial specialization are
|
3457 | 3455 | unrelated to the members of the primary template.
|
3458 | 3456 | Class template partial specialization members that are used in a way that
|
|
4789 | 4787 | the name of the nested class referenced as a member of the
|
4790 | 4788 | current instantiation, or
|
4791 | 4789 | \item
|
4792 |
| -in the definition of a partial specialization |
4793 |
| -or a member of a partial specialization, the name of |
| 4790 | +in the definition of a class template partial specialization |
| 4791 | +or a member of a class template partial specialization, the name of |
4794 | 4792 | the class template followed by a template argument list
|
4795 |
| -equivalent to that of the partial specialization\iref{temp.class.spec} |
| 4793 | +equivalent to that of the partial specialization\iref{temp.spec.partial} |
4796 | 4794 | enclosed in \tcode{<>} (or an equivalent template alias specialization).
|
4797 | 4795 | \end{itemize}
|
4798 | 4796 |
|
|
5724 | 5722 | }
|
5725 | 5723 | \end{codeblock}
|
5726 | 5724 | \end{example}
|
5727 |
| -If the template selected for the specialization\iref{temp.class.spec.match} |
| 5725 | +If the template selected for the specialization\iref{temp.spec.partial.match} |
5728 | 5726 | has been declared, but not defined,
|
5729 | 5727 | at the point of instantiation\iref{temp.point},
|
5730 | 5728 | the instantiation yields an incomplete class type\iref{basic.types}.
|
|
0 commit comments