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
8 changes: 4 additions & 4 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3410,10 +3410,10 @@
\pnum
\indextext{class!variant member of}%
A \defnadj{union-like}{class} is a union or a class that has an anonymous union as a direct
member. A union-like class \tcode{X} has a set of \defnx{variant members}{variant member}.
If \tcode{X} is a union, a non-static data member of \tcode{X} that is not an anonymous
union is a variant member of \tcode{X}. In addition, a non-static data member of an
anonymous union that is a member of \tcode{X} is also a variant member of \tcode{X}.
member.
The \defnx{variant members}{variant member} of a union-like class \tcode{X} are the variant
members of the anonymous union members of \tcode{X} and, if \tcode{X} is a union, the
non-static data members of \tcode{X} other than anonymous union members.
Comment on lines +3414 to +3416
Copy link
Member

@eisenwave eisenwave Nov 11, 2025

Choose a reason for hiding this comment

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

Suggested change
The \defnx{variant members}{variant member} of a union-like class \tcode{X} are the variant
members of the anonymous union members of \tcode{X} and, if \tcode{X} is a union, the
non-static data members of \tcode{X} other than anonymous union members.
The \defnx{variant members}{variant member} of a union-like class \tcode{X} are
the variant members of the anonymous union members of \tcode{X}, and
if \tcode{X} is a union, the non-static data members of \tcode{X} other than anonymous union members.

If we're touching this section anyway, it seems beneficial to reflow the text so that if it was turned into bullets, we'd only need to add \items at the start of each line.

The \defnx{variant members}{variant member} of a union-like class \tcode{X} are
\begin{itemize}
\item the variant members of the anonymous union members of \tcode{X}, and
\item if \tcode{X} is a union, the non-static data members of \tcode{X} other than anonymous union members.
\end{itemize}

Copy link
Member

Choose a reason for hiding this comment

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

Personally, I don't think this paragraph is that broken though. The suggestion seems like a slight upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The placement of the comma in the suggestion is less grammatical as the list is of two items and the commas are parenthetical (around the condition introduced with the "if") in nature.

At most one variant member of a union may have a default member initializer.
\begin{example}
\begin{codeblock}
Expand Down