Skip to content

Commit 1aa9db1

Browse files
committed
[temp.res] Fix self-contradiction in paragraph describing when a template
with valid specializations can be diagnosed. Also convert to bulleted form for clarity.
1 parent 1543236 commit 1aa9db1

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

source/templates.tex

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,25 +3100,25 @@
31003100
\indextext{checking!point~of error}%
31013101
Knowing which names are type names allows the syntax of every template
31023102
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
31123113
immediately following its definition
31133114
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
31173118
in the hypothetical instantiation
31183119
is different from
31193120
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.
31223122
\enternote
31233123
This can happen in situations including the following:
31243124
\begin{itemize}
@@ -3146,6 +3146,9 @@
31463146
specialization that was not declared when the template was defined.
31473147
\end{itemize}
31483148
\exitnote
3149+
\end{itemize}
3150+
Otherwise, no diagnostic shall be issued for a template
3151+
for which a valid specialization can be generated.
31493152
\enternote
31503153
If a template is instantiated, errors will be diagnosed according
31513154
to the other rules in this Standard.

0 commit comments

Comments
 (0)