Skip to content
Open
Changes from all commits
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
18 changes: 13 additions & 5 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,19 @@
and conversion function declarations only;
when declaring another kind of member the \grammarterm{decl-specifier-seq}
shall contain a \grammarterm{type-specifier} that is not a \grammarterm{cv-qualifier}.
The
\grammarterm{member-declarator-list} can be omitted only after a
\grammarterm{class-specifier} or an \grammarterm{enum-specifier} or in a
friend declaration\iref{class.friend}. A
\grammarterm{pure-specifier} shall be used only in the declaration of a
The \grammarterm{member-declarator-list} can be omitted only
after
Comment on lines +669 to +670
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "can be omitted only after" is problematic phrasing -- it's unclear whether it's giving permission, stating a restriction, or both. (Can a member-declarator-list be omitted after any elaborated-type-specifier, or only some of them?) This is made a little worse by this change, because three of the four top-level grammar productions for elaborated-type-specifier aren't allowed in this context, per the end of [dcl.type.elab]p1. This might help:

The \grammarterm{member-declarator-list} shall not be omitted unless
the declaration is a friend declaration or its sole constituent is

  • ...

\begin{itemize}
\item
a \grammarterm{class-specifier},
\item
an \grammarterm{enum-specifier}, or
\item
an \grammarterm{elaborated-type-specifier}
that is the sole constituent of a declaration\iref{dcl.type.elab}, or
\end{itemize}
in a friend declaration\iref{class.friend}.
A \grammarterm{pure-specifier} shall be used only in the declaration of a
virtual function\iref{class.virtual}
that is not a friend declaration.

Expand Down