Skip to content

Commit 76bf42d

Browse files
burblebeetkoeppe
authored andcommitted
CWG2877 Type-only lookup for using-enum-declarator
1 parent 4ceed3f commit 76bf42d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

source/declarations.tex

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7477,11 +7477,26 @@
74777477
\pnum
74787478
A \grammarterm{using-enum-declarator}
74797479
names the set of declarations found by
7480-
lookup\iref{basic.lookup.unqual,basic.lookup.qual}
7481-
for the \grammarterm{using-enum-declarator}.
7480+
type-only lookup\iref{basic.lookup.general}
7481+
for the \grammarterm{using-enum-declarator}\iref{basic.lookup.unqual,basic.lookup.qual}.
74827482
The \grammarterm{using-enum-declarator}
74837483
shall designate a non-dependent type
74847484
with a reachable \grammarterm{enum-specifier}.
7485+
\begin{example}
7486+
\begin{codeblock}
7487+
enum E { x };
7488+
void f() {
7489+
int E;
7490+
using enum E; // OK
7491+
}
7492+
using F = E;
7493+
using enum F; // OK
7494+
template<class T> using EE = T;
7495+
void g() {
7496+
using enum EE<E>; // OK
7497+
}
7498+
\end{codeblock}
7499+
\end{example}
74857500

74867501
\pnum
74877502
A \grammarterm{using-enum-declaration}

0 commit comments

Comments
 (0)