Skip to content

Commit b57af5a

Browse files
burblebeetkoeppe
authored andcommitted
CWG2621 Kind of lookup for using enum declarations
Fixes NB CA 054 (C++23 CD).
1 parent 3f97a65 commit b57af5a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

source/declarations.tex

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,11 +1356,6 @@
13561356
class-key \opt{attribute-specifier-seq} \opt{nested-name-specifier} identifier\br
13571357
class-key simple-template-id\br
13581358
class-key nested-name-specifier \opt{\keyword{template}} simple-template-id\br
1359-
elaborated-enum-specifier
1360-
\end{bnf}
1361-
1362-
\begin{bnf}
1363-
\nontermdef{elaborated-enum-specifier}\br
13641359
\keyword{enum} \opt{nested-name-specifier} identifier
13651360
\end{bnf}
13661361

@@ -7161,13 +7156,23 @@
71617156

71627157
\begin{bnf}
71637158
\nontermdef{using-enum-declaration}\br
7164-
\terminal{using} elaborated-enum-specifier \terminal{;}
7159+
\keyword{using} \keyword{enum} using-enum-declarator \terminal{;}
7160+
\end{bnf}
7161+
7162+
\begin{bnf}
7163+
\nontermdef{using-enum-declarator}\br
7164+
\opt{nested-name-specifier} identifier\br
7165+
\opt{nested-name-specifier} simple-template-id
71657166
\end{bnf}
71667167

71677168
\pnum
7168-
The \grammarterm{elaborated-enum-specifier}
7169-
shall not name a dependent type
7170-
and the type shall have a reachable \grammarterm{enum-specifier}.
7169+
A \grammarterm{using-enum-declarator}
7170+
names the set of declarations found by
7171+
lookup\iref{basic.lookup.unqual,basic.lookup.qual}
7172+
for the \grammarterm{using-enum-declarator}.
7173+
The \grammarterm{using-enum-declarator}
7174+
shall designate a non-dependent type
7175+
with a reachable \grammarterm{enum-specifier}.
71717176

71727177
\pnum
71737178
A \grammarterm{using-enum-declaration}

0 commit comments

Comments
 (0)