Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd92d7b

Browse files
committedNov 17, 2022
CWG2621 Kind of lookup for using enum declarations
Also fixes NB CA 054 (C++23 CD).
1 parent 1381b02 commit bd92d7b

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
@@ -1348,11 +1348,6 @@
13481348
class-key \opt{attribute-specifier-seq} \opt{nested-name-specifier} identifier\br
13491349
class-key simple-template-id\br
13501350
class-key nested-name-specifier \opt{\keyword{template}} simple-template-id\br
1351-
elaborated-enum-specifier
1352-
\end{bnf}
1353-
1354-
\begin{bnf}
1355-
\nontermdef{elaborated-enum-specifier}\br
13561351
\keyword{enum} \opt{nested-name-specifier} identifier
13571352
\end{bnf}
13581353

@@ -7102,13 +7097,23 @@
71027097

71037098
\begin{bnf}
71047099
\nontermdef{using-enum-declaration}\br
7105-
\terminal{using} elaborated-enum-specifier \terminal{;}
7100+
\terminal{using enum} using-enum-declarator \terminal{;}
7101+
\end{bnf}
7102+
7103+
\begin{bnf}
7104+
\nontermdef{using-enum-declarator}\br
7105+
\opt{nested-name-specifier} identifier\br
7106+
\opt{nested-name-specifier} simple-template-id
71067107
\end{bnf}
71077108

71087109
\pnum
7109-
The \grammarterm{elaborated-enum-specifier}
7110-
shall not name a dependent type
7111-
and the type shall have a reachable \grammarterm{enum-specifier}.
7110+
A \grammarterm{using-enum-declarator}
7111+
names the set of declarations found by
7112+
lookup (\ref{basic.lookup.unqual}, \ref{basic.lookup.qual})
7113+
for the \grammarterm{using-enum-declarator}.
7114+
The \grammarterm{using-enum-declarator}
7115+
shall designate a non-dependent type
7116+
with a reachable \grammarterm{enum-specifier}.
71127117

71137118
\pnum
71147119
A \grammarterm{using-enum-declaration}

0 commit comments

Comments
 (0)
Please sign in to comment.