|
3100 | 3100 | \indextext{checking!point~of error}%
|
3101 | 3101 | Knowing which names are type names allows the syntax of every template
|
3102 | 3102 | to be checked.
|
3103 |
| -No diagnostic shall be issued for a template |
3104 |
| -for which a valid specialization can be generated. |
3105 |
| -If no valid specialization can be generated |
3106 |
| -for a template, |
3107 |
| -and that template is not instantiated, the template is ill-formed, |
3108 |
| -no diagnostic required. |
3109 |
| -If every valid specialization of a variadic template requires an empty template |
3110 |
| -parameter pack, the template is ill-formed, no diagnostic required. |
3111 |
| -If a hypothetical instantiation of a template |
| 3103 | +The program is ill-formed, no diagnostic required, if: |
| 3104 | +\begin{itemize} |
| 3105 | +\item |
| 3106 | +no valid specialization can be generated for a template |
| 3107 | +and that template is not instantiated, or |
| 3108 | +\item |
| 3109 | +every valid specialization of a variadic template requires an empty template |
| 3110 | +parameter pack, or |
| 3111 | +\item |
| 3112 | +a hypothetical instantiation of a template |
3112 | 3113 | immediately following its definition
|
3113 | 3114 | would be ill-formed
|
3114 |
| -due to a construct that does not depend on a template parameter, |
3115 |
| -the program is ill-formed; no diagnostic is required. |
3116 |
| -If the interpretation of such a construct |
| 3115 | +due to a construct that does not depend on a template parameter, or |
| 3116 | +\item |
| 3117 | +the interpretation of such a construct |
3117 | 3118 | in the hypothetical instantiation
|
3118 | 3119 | is different from
|
3119 | 3120 | the interpretation of the corresponding construct
|
3120 |
| -in any actual instantiation of the template, |
3121 |
| -the program is ill-formed; no diagnostic is required. |
| 3121 | +in any actual instantiation of the template. |
3122 | 3122 | \enternote
|
3123 | 3123 | This can happen in situations including the following:
|
3124 | 3124 | \begin{itemize}
|
|
3146 | 3146 | specialization that was not declared when the template was defined.
|
3147 | 3147 | \end{itemize}
|
3148 | 3148 | \exitnote
|
| 3149 | +\end{itemize} |
| 3150 | +Otherwise, no diagnostic shall be issued for a template |
| 3151 | +for which a valid specialization can be generated. |
3149 | 3152 | \enternote
|
3150 | 3153 | If a template is instantiated, errors will be diagnosed according
|
3151 | 3154 | to the other rules in this Standard.
|
|
0 commit comments