Skip to content

Commit 548318f

Browse files
committed
[temp.res.general] Clarify dependent qualified-ids in a type-only context
1 parent 7fc7707 commit 548318f

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎source/templates.tex‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4385,13 +4385,20 @@
43854385
\end{example}
43864386

43874387
\pnum
4388-
A \grammarterm{qualified-id}
4389-
whose terminal name is dependent and that is in a type-only context
4390-
is considered to denote a type.
4388+
Each of the forms
4389+
\begin{ncsimplebnf}
4390+
nested-name-specifier identifier\br
4391+
nested-name-specifier \opt{\keyword{template}} simple-template-id
4392+
\end{ncsimplebnf}
4393+
where the terminal name $N$ is dependent\iref{temp.dep.type}
4394+
is interpreted as a \grammarterm{simple-type-specifier}\iref{dcl.type.simple}
4395+
if $N$ is in a type-only context and
4396+
as a \grammarterm{qualified-id}\iref{expr.prim.id.qual} otherwise.
43914397
A name
43924398
that refers to a \grammarterm{using-declarator} whose terminal name is dependent
4393-
is interpreted as a \grammarterm{typedef-name}
4394-
if the \grammarterm{using-declarator} uses the keyword \keyword{typename}.
4399+
is interpreted as a \grammarterm{typedef-name}\iref{dcl.typedef}
4400+
if the \grammarterm{using-declarator} uses the keyword \keyword{typename}
4401+
and as an \grammarterm{unqualified-id}\iref{expr.prim.id.unqual} otherwise.
43954402
\begin{example}
43964403
\begin{codeblock}
43974404
template <class T> void f(int i) {

0 commit comments

Comments
 (0)