Skip to content

dependent names #4793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[temp.res.general] Clarify dependent qualified-ids in a type-only con…
…text
  • Loading branch information
jensmaurer committed Sep 17, 2021
commit af39c817fa2c043f49d094e82b4c092d38d10d5f
17 changes: 12 additions & 5 deletions source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4385,13 +4385,20 @@
\end{example}

\pnum
A \grammarterm{qualified-id}
whose terminal name is dependent and that is in a type-only context
is considered to denote a type.
Each of the forms
\begin{ncsimplebnf}
nested-name-specifier identifier\br
nested-name-specifier \opt{\keyword{template}} simple-template-id
\end{ncsimplebnf}
where the terminal name $N$ is dependent\iref{temp.dep.type}
is interpreted as a \grammarterm{simple-type-specifier}\iref{dcl.type.simple}
if $N$ is in a type-only context and
as a \grammarterm{qualified-id}\iref{expr.prim.id.qual} otherwise.
A name
that refers to a \grammarterm{using-declarator} whose terminal name is dependent
is interpreted as a \grammarterm{typedef-name}
if the \grammarterm{using-declarator} uses the keyword \keyword{typename}.
is interpreted as a \grammarterm{typedef-name}\iref{dcl.typedef}
if the \grammarterm{using-declarator} uses the keyword \keyword{typename}
and as an \grammarterm{unqualified-id}\iref{expr.prim.id.unqual} otherwise.
\begin{example}
\begin{codeblock}
template <class T> void f(int i) {
Expand Down
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