Skip to content

Commit 13f4e96

Browse files
committed
[temp.res] Convert note to footnote to avoid breaking up flow,
add back introductory sentence for the template validity rule, and fix formatting of example.
1 parent dec138c commit 13f4e96

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/templates.tex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4078,9 +4078,9 @@
40784078
\begin{itemize}
40794079
\item \grammarterm{simple-declaration} or a \grammarterm{function-definition} in namespace scope,
40804080
\item \grammarterm{member-declaration},
4081-
\item \grammarterm{parameter-declaration} in a \grammarterm{member-declaration},
4082-
unless that \grammarterm{parameter-declaration} appears in a default argument
4083-
\begin{note} This includes friend function declarations. \end{note},
4081+
\item \grammarterm{parameter-declaration} in a \grammarterm{member-declaration}%
4082+
\footnote{This includes friend function declarations.},
4083+
unless that \grammarterm{parameter-declaration} appears in a default argument,
40844084
\item \grammarterm{parameter-declaration} in a \grammarterm{declarator}
40854085
of a function or function template declaration
40864086
whose \grammarterm{declarator-id} is qualified,
@@ -4113,13 +4113,14 @@
41134113
\begin{example}
41144114
\begin{codeblock}
41154115
template<class T> T::R f(); // OK, return type of a function declaration at global scope
4116-
template<class T> void f(T::R); // ill-formed (no diagnostic required), attempt to declare a \tcode{void} variable template
4116+
template<class T> void f(T::R); // ill-formed (no diagnostic required), attempt to declare
4117+
// a \tcode{void} variable template
41174118
template<class T> struct S {
41184119
using Ptr = PtrTraits<T>::Ptr; // OK, in a \grammarterm{defining-type-id}
41194120
T::R f(T::P p) { // OK, class scope
41204121
return static_cast<T::R>(p); // OK, \grammarterm{type-id} of a \tcode{static_cast}
41214122
}
4122-
auto g() -> S<T*>::Ptr; // OK, \grammarterm{trailing-return-type}
4123+
auto g() -> S<T*>::Ptr; // OK, \grammarterm{trailing-return-type}
41234124
};
41244125
template<typename T> void f() {
41254126
void (*pf)(T::X); // variable \tcode{pf} of type \tcode{void*} initialized with \tcode{T::X}
@@ -4174,9 +4175,10 @@
41744175
\pnum
41754176
\indextext{checking!syntax}%
41764177
\indextext{checking!point of error}%
4178+
The validity of a template may be checked prior to any instantiation.
41774179
\begin{note}
41784180
Knowing which names are type names allows the syntax of every template
4179-
to be checked.
4181+
to be checked in this way.
41804182
\end{note}
41814183
The program is ill-formed, no diagnostic required, if:
41824184

0 commit comments

Comments
 (0)