Skip to content

Commit 498b482

Browse files
committed
P1847R4 Make declaration order layout mandated
1 parent fb3bea8 commit 498b482

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

source/classes.tex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -739,15 +739,11 @@
739739
\pnum
740740
\begin{note}
741741
\indextext{layout!class object}%
742-
Non-static data members of a (non-union) class
743-
with the same access control\iref{class.access} and
742+
Non-variant non-static data members of
744743
non-zero size\iref{intro.object}
745744
are allocated so that later
746745
members have higher addresses within a class object\iref{expr.rel}.
747746
\indextext{allocation!unspecified}%
748-
The order of allocation of non-static data members
749-
with different access control
750-
is unspecified.
751747
Implementation alignment requirements can cause two adjacent members
752748
not to be allocated immediately after each other; so can requirements
753749
for space for managing virtual functions\iref{class.virtual} and

source/expressions.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,8 +6240,7 @@
62406240
\item If two pointers point to different non-static data members of the same
62416241
object, or to subobjects of such members, recursively,
62426242
the pointer to the later declared member is required to compare greater provided
6243-
the two members have the same access control\iref{class.access},
6244-
neither member is a subobject of zero size,
6243+
neither member is a subobject of zero size
62456244
and their class is not a union.
62466245

62476246
\item Otherwise, neither pointer is required to compare greater than the other.

0 commit comments

Comments
 (0)