From bb641cba40211374d8b2dd3472f42274de662761 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Sat, 20 Jul 2019 10:26:15 -0700 Subject: [PATCH] CWG2404 [[no_unique_address]] and allocation order --- source/classes.tex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index 0b9e26bccf..82ef9e827d 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -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