File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 68366836\end {example }
68376837\item
68386838Otherwise, if lookup finds a namespace alias\iref {namespace.alias },
6839- $ R$ represents that namespace alias.
6839+ all declarations found by name lookup shall have the same target scope, and
6840+ $ R$ represents the namespace alias.
68406841\item
68416842Otherwise, if lookup finds a namespace\iref {basic.namespace },
68426843$ R$ represents that namespace.
68736874\end {note }
68746875\end {itemize }
68756876\item
6876- Otherwise, if lookup finds a type alias $ A$ ,
6877- $ R$ represents the underlying entity of $ A$
6878- if $ A$ was introduced by the declaration of a template parameter;
6879- otherwise, $ R$ represents $ A$ .
6877+ Otherwise, if lookup finds a type alias:
6878+ \begin {itemize }
6879+ \item
6880+ If any declaration found by name lookup is of a template parameter $ T$ ,
6881+ $ R$ represents the underlying entity of $ T$ .
6882+ \item
6883+ Otherwise,
6884+ all declarations found by name lookup shall have the same target scope, and
6885+ $ R$ represents the type alias.
6886+ \end {itemize }
6887+ \begin {example }
6888+ \begin {codeblock }
6889+ namespace A {
6890+ using T = int;
6891+ }
6892+ namespace B {
6893+ using T = int;
6894+ }
6895+ using namespace A;
6896+ using namespace B;
6897+ auto r = ^^T; // error: lookup finds type aliases with different target scopes
6898+ \end {codeblock }
6899+ \end {example }
68806900\item
68816901Otherwise, if lookup finds a class or an enumeration,
68826902$ R$ represents the denoted type.
You can’t perform that action at this time.
0 commit comments