Skip to content

Commit 6568af0

Browse files
committed
[temp] Add note around example to explain what it's an example of, and
add missing paragraph numbers.
1 parent d37aa67 commit 6568af0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/templates.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
\tcode{>{>}} token by two consecutive \tcode{>}
6565
tokens~(\ref{temp.names}).\end{note}
6666

67+
\pnum
6768
The
6869
\grammarterm{declaration}
6970
in a
@@ -84,6 +85,7 @@
8485
\item be an \grammarterm{alias-declaration}.
8586
\end{itemize}
8687

88+
\pnum
8789
A \grammarterm{template-declaration} is a \grammarterm{declaration}.
8890
\indextext{template!definition of}%
8991
A \grammarterm{template-declaration} is also a definition
@@ -205,12 +207,18 @@
205207
\grammarterm{constraint-expression}.
206208
The \grammarterm{constraint-logical-or-expression} of a
207209
\grammarterm{requires-clause} is an unevaluated operand (Clause~\ref{expr}).
210+
\begin{note}
211+
The expression in a \grammarterm{requires-clause}
212+
uses a restricted grammar to avoid ambiguities.
213+
Parentheses can be used to specify arbitrary expressions
214+
in a \grammarterm{requires-clause}.
208215
\begin{example}
209216
\begin{codeblock}
210217
template<int N> requires N == sizeof unsigned short
211218
int f(); // error: parentheses required around \tcode{==} expression
212219
\end{codeblock}
213220
\end{example}
221+
\end{note}
214222

215223
\pnum
216224
A function template, member function of a class template, variable template,

0 commit comments

Comments
 (0)