Skip to content

P1847R4 Make declaration order layout mandated #4667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
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
7 changes: 1 addition & 6 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -739,15 +739,10 @@
\pnum
\begin{note}
\indextext{layout!class object}%
Non-static data members of a (non-union) class
with the same access control\iref{class.access} and
Non-variant non-static data members of
non-zero size\iref{intro.object}
are allocated so that later
members have higher addresses within a class object\iref{expr.rel}.
\indextext{allocation!unspecified}%
The order of allocation of non-static data members
with different access control
is unspecified.
Implementation alignment requirements can cause two adjacent members
not to be allocated immediately after each other; so can requirements
for space for managing virtual functions\iref{class.virtual} and
Expand Down
3 changes: 1 addition & 2 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6246,8 +6246,7 @@
\item If two pointers point to different non-static data members of the same
object, or to subobjects of such members, recursively,
the pointer to the later declared member is required to compare greater provided
the two members have the same access control\iref{class.access},
neither member is a subobject of zero size,
neither member is a subobject of zero size
and their class is not a union.

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