Skip to content

Commit 95c6ec5

Browse files
committed
Fixup: temp
1 parent 3934ec8 commit 95c6ec5

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

source/basic.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,7 @@
14441444
A type (but not a \grammarterm{typedef-name} or template)
14451445
is therefore hidden by any other entity in its scope.
14461446
\end{note}
1447+
\indextext{type-only!lookup|see{lookup, type-only}}%
14471448
However, if a lookup is \defnx{type-only}{lookup!type-only},
14481449
only declarations of
14491450
types and templates whose specializations are types are considered;

source/templates.tex

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
A specialization (explicit or implicit) of one template is
137137
distinct from all specializations of any other template.
138138
A template, a template explicit specialization\iref{temp.expl.spec}, and a class
139-
template partial specialization shall not have C linkage.
139+
template partial specialization shall not have C language linkage.
140140
\begin{note}
141141
Default arguments for function templates and for member functions of
142142
class templates are considered definitions for the purpose of template
@@ -145,7 +145,7 @@
145145

146146
\pnum
147147
\begin{note}
148-
A class cannot have the same name as any other
148+
A template cannot have the same name as any other
149149
name bound in the same scope\iref{basic.scope.scope}, except
150150
that a function template can share a name with non-template
151151
functions\iref{dcl.fct} and/or function templates\iref{temp.over}.
@@ -716,8 +716,8 @@
716716
\item
717717
that is a terminal name
718718
in a \grammarterm{using-declarator}\iref{namespace.udecl},
719-
a \grammarterm{declarator-id}\iref{dcl.meaning}, or
720-
a type-only context
719+
in a \grammarterm{declarator-id}\iref{dcl.meaning}, or
720+
in a type-only context
721721
other than a \grammarterm{nested-name-specifier}\iref{temp.res}.
722722
\end{itemize}
723723
\begin{note}
@@ -4206,14 +4206,14 @@
42064206
in an unspecified declaration of $T$ that is or is reachable from $D$ and
42074207
from which no other declaration of $T$
42084208
that contains the usage of the name is reachable.
4209-
If the name is dependent (as specified in \ref{temp.dep},
4209+
If the name is dependent (as specified in \ref{temp.dep}),
42104210
it is looked up for each specialization (after substitution)
42114211
because the lookup depends on a template parameter.
42124212
\begin{note}
42134213
Some dependent names are also looked up during parsing to determine
42144214
that they are dependent or to interpret following \tcode{<} tokens.
42154215
Uses of other names might be type-dependent or value-dependent
4216-
(\ref{temp.dep.expr}, \ref{temp.dep.constexpr}.
4216+
(\ref{temp.dep.expr}, \ref{temp.dep.constexpr}).
42174217
A \grammarterm{using-declarator} is never dependent in a specialization and
42184218
is therefore replaced during lookup for that specialization\iref{basic.lookup}.
42194219
\end{note}
@@ -4323,7 +4323,9 @@
43234323
\end{example}
43244324

43254325
\pnum
4326-
A qualified or unqualified name is said to be in a type-only context
4326+
\indextext{type-only!context|see{context, type-only}}%
4327+
A qualified or unqualified name is said to be in
4328+
a \defnx{type-only context}{context!type-only}
43274329
if it is the terminal name of
43284330
\begin{itemize}
43294331
\item a
@@ -4333,16 +4335,18 @@
43334335
\grammarterm{class-or-decltype}, or
43344336
\item
43354337
a \grammarterm{type-specifier} of a
4336-
\grammarterm{new-type-id},
4337-
\grammarterm{defining-type-id},
4338-
\grammarterm{conversion-type-id},
4339-
\grammarterm{trailing-return-type},
4340-
default argument of a \grammarterm{type-parameter}, or
4341-
\grammarterm{type-id} of a
4338+
\begin{itemize}
4339+
\item \grammarterm{new-type-id},
4340+
\item \grammarterm{defining-type-id},
4341+
\item \grammarterm{conversion-type-id},
4342+
\item \grammarterm{trailing-return-type},
4343+
\item default argument of a \grammarterm{type-parameter}, or
4344+
\item \grammarterm{type-id} of a
43424345
\keyword{static_cast},
43434346
\keyword{const_cast},
43444347
\keyword{reinterpret_cast}, or
43454348
\keyword{dynamic_cast}, or
4349+
\end{itemize}
43464350
\item a \grammarterm{decl-specifier} of the \grammarterm{decl-specifier-seq} of a
43474351
\begin{itemize}
43484352
\item \grammarterm{simple-declaration} or a \grammarterm{function-definition} in namespace scope,
@@ -4666,8 +4670,8 @@
46664670
}
46674671

46684672
template<class B> template<class C> void N::A<B>::g(C) {
4669-
B b; // the base class, not the template parameter
4670-
C c; // the template parameter \tcode{C}, not \tcode{A}'s \tcode{C}
4673+
B b; // \tcode{B} is the base class, not the template parameter
4674+
C c; // \tcode{C} is the template parameter, not \tcode{A}'s \tcode{C}
46714675
}
46724676
\end{codeblock}
46734677
\end{example}
@@ -4720,7 +4724,8 @@
47204724
is a \grammarterm{template-id} in which any of the template arguments depends
47214725
on a template parameter.
47224726
\end{itemize}
4723-
The component name of an \grammarterm{unqualified-id} is dependent if
4727+
The component name of an \grammarterm{unqualified-id}\iref{expr.prim.id.unqual}
4728+
is dependent if
47244729
\begin{itemize}
47254730
\item
47264731
it is a \grammarterm{conversion-function-id}
@@ -4787,7 +4792,7 @@
47874792
\item
47884793
in the definition of a partial specialization
47894794
or a member of a partial specialization, the name of
4790-
the class template followed by the template argument list
4795+
the class template followed by a template argument list
47914796
equivalent to that of the partial specialization\iref{temp.class.spec}
47924797
enclosed in \tcode{<>} (or an equivalent template alias specialization).
47934798
\end{itemize}
@@ -4883,7 +4888,7 @@
48834888
if
48844889
\begin{itemize}
48854890
\item
4886-
its lookup context, if it is a \grammarterm{qualified name},
4891+
its lookup context, if it is a qualified name,
48874892
is the current instantiation, and
48884893
\item
48894894
lookup for it finds any member of a class that is the current instantiation
@@ -4950,7 +4955,7 @@
49504955
\pnum
49514956
If, for a given set of template arguments, a specialization of a template is
49524957
instantiated that refers to a member of the current instantiation with a
4953-
qualified name, the name in is looked up in the
4958+
qualified name, the name is looked up in the
49544959
template instantiation context. If the result of this lookup differs from the
49554960
result of name lookup in the template definition context, name lookup is
49564961
ambiguous.
@@ -5936,7 +5941,7 @@
59365941
\pnum
59375942
An implementation shall not implicitly instantiate a function template,
59385943
a variable template,
5939-
a member template, a non-virtual member function, or a member class or
5944+
a member template, a non-virtual member function, a member class or
59405945
static data member of a templated class, or a substatement of a constexpr if
59415946
statement\iref{stmt.if}, unless such instantiation is required.
59425947
\begin{note}

0 commit comments

Comments
 (0)