Skip to content

Commit 315dbcc

Browse files
committed
[temp.res.general] Clarify dependent qualified-ids in a type-only context
1 parent d0613e9 commit 315dbcc

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy