Skip to content

Commit 1393aac

Browse files
[class.union.anon] Tighten definition of "variant member"
Rephrase the definition of variant members to address the following problems with the current wording: - It creates a misleading reading of the "[in] addition, [ ... ]" sentence as applying only to the case where `X` is a union. - It is not phrased as complete/exhaustive.
1 parent 605dcaa commit 1393aac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/classes.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,10 +3410,10 @@
34103410
\pnum
34113411
\indextext{class!variant member of}%
34123412
A \defnadj{union-like}{class} is a union or a class that has an anonymous union as a direct
3413-
member. A union-like class \tcode{X} has a set of \defnx{variant members}{variant member}.
3414-
If \tcode{X} is a union, a non-static data member of \tcode{X} that is not an anonymous
3415-
union is a variant member of \tcode{X}. In addition, a non-static data member of an
3416-
anonymous union that is a member of \tcode{X} is also a variant member of \tcode{X}.
3413+
member.
3414+
The \defnx{variant members}{variant member} of a union-like class \tcode{X} are the variant
3415+
members of the anonymous union members of \tcode{X} and, if \tcode{X} is a union, the
3416+
non-static data members of \tcode{X} other than anonymous union members.
34173417
At most one variant member of a union may have a default member initializer.
34183418
\begin{example}
34193419
\begin{codeblock}

0 commit comments

Comments
 (0)