Skip to content

Commit

Permalink
CWG2404 [[no_unique_address]] and allocation order
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawn Perchik authored and zygoloid committed Aug 2, 2019
1 parent 9824fd7 commit bb641cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/classes.tex
Expand Up @@ -713,19 +713,22 @@
\end{example}

\pnum
\begin{note}
\indextext{layout!class object}%
Non-static data members of a (non-union) class
with the same access control\iref{class.access}
with the same access control\iref{class.access} and
non-zero size\iref{intro.object}
are allocated so that later
members have higher addresses within a class object.
\indextext{allocation!unspecified}%
The order of allocation of non-static data members
with different access control
is unspecified\iref{class.access}.
is unspecified.
Implementation alignment requirements might cause two adjacent members
not to be allocated immediately after each other; so might requirements
for space for managing virtual functions\iref{class.virtual} and
virtual base classes\iref{class.mi}.
\end{note}

\pnum
If \tcode{T} is the name of a class, then each of the following shall
Expand Down

0 comments on commit bb641cb

Please sign in to comment.