Skip to content

Commit 7327e8a

Browse files
committed
CWG2254 Standard-layout classes and bit-fields
1 parent fbd725c commit 7327e8a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4156,7 +4156,7 @@
41564156
one is a standard-layout class object and
41574157
the other is the first non-static data member of that object, or,
41584158
if the object has no non-static data members,
4159-
the first base class subobject of that object\iref{class.mem}, or
4159+
any base class subobject of that object\iref{class.mem}, or
41604160
\item
41614161
there exists an object \placeholder{c} such that
41624162
\placeholder{a} and \placeholder{c} are pointer-interconvertible, and

source/classes.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,12 @@
801801

802802
\pnum
803803
If a standard-layout class object has any non-static data members, its address
804-
is the same as the address of its first non-static data member. Otherwise, its
805-
address is the same as the address of its first base class subobject (if any).
804+
is the same as the address of its first non-static data member
805+
if that member is not a bit-field. Its
806+
address is also the same as the address of each of its base class subobjects.
806807
\begin{note}
807-
There might therefore be unnamed padding within a standard-layout struct object, but
808+
There might therefore be unnamed padding within a standard-layout struct object
809+
inserted by an implementation, but
808810
not at its beginning, as necessary to achieve appropriate alignment.
809811
\end{note}
810812
\begin{note}

0 commit comments

Comments
 (0)