Skip to content

Commit 129f699

Browse files
committed
[class.pre] [class.union] Clean up definition of 'union'.
Move primary definition from [class.pre] to [class.union]. Add note to [class.pre] specifying where to look for the meaning of the class-key. Move note on aggregate classes from [class.pre] to [class.prop].
1 parent 1457b30 commit 129f699

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

source/classes.tex

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@
9999
\grammarterm{class-head-name} of the
100100
definition shall not begin with a \grammarterm{decltype-specifier}.
101101

102+
\pnum
103+
\begin{note}
104+
The \grammarterm{class-key} determines
105+
whether the class is a union\iref{class.union} and
106+
whether access is public or private by default\iref{class.access}.
107+
A union holds the value of at most one data member at a time.
108+
\end{note}
109+
102110
\pnum
103111
If a class is marked with the \grammarterm{class-virt-specifier} \tcode{final} and it appears
104112
as a \grammarterm{class-or-decltype} in a \grammarterm{base-clause}\iref{class.derived},
@@ -138,14 +146,6 @@
138146
can be defined by the user; see~\ref{over.oper}.
139147
\end{note}
140148

141-
\pnum
142-
A \defn{union} is a class defined with the \grammarterm{class-key}
143-
\tcode{union};
144-
it holds at most one data member at a time\iref{class.union}.
145-
\begin{note}
146-
Aggregates of class type are described in~\ref{dcl.init.aggr}.
147-
\end{note}
148-
149149
\rSec1[class.prop]{Properties of classes}
150150

151151
\pnum
@@ -283,6 +283,11 @@
283283
\end{codeblock}
284284
\end{example}
285285

286+
\pnum
287+
\begin{note}
288+
Aggregates of class type are described in~\ref{dcl.init.aggr}.
289+
\end{note}
290+
286291
\rSec1[class.name]{Class names}
287292
\indextext{definition!class name as type}%
288293
\indextext{structure tag|see{class name}}%
@@ -3080,6 +3085,10 @@
30803085
\rSec1[class.union]{Unions}%
30813086
\indextext{\idxcode{union}}
30823087

3088+
\pnum
3089+
A \defn{union} is a class defined with the \grammarterm{class-key}
3090+
\tcode{union}.
3091+
30833092
\pnum
30843093
In a union,
30853094
a non-static data member is \defnx{active}{active!union member}

0 commit comments

Comments
 (0)