Skip to content

Commit 2cd4452

Browse files
committed
Merge 2017-07 CWG Motion 1
2 parents c92eb3a + b2f0230 commit 2cd4452

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

source/basic.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,7 +3564,10 @@
35643564
\indextext{representation!value}%
35653565
\defn{value representation}
35663566
of an object is the set of bits that hold
3567-
the value of type \tcode{T}. For trivially copyable types, the value representation is
3567+
the value of type \tcode{T}.
3568+
Bits in the object representation that are not part of the value representation
3569+
are \defn{padding bits}.
3570+
For trivially copyable types, the value representation is
35683571
a set of bits in the object representation that determines a
35693572
\defn{value}, which is one discrete element of an
35703573
\impldef{values of a trivially copyable type} set of values.\footnote{The
@@ -3731,7 +3734,7 @@
37313734
\begin{note}
37323735
A bit-field of narrow character type whose length is larger than
37333736
the number of bits in the object representation of that type has
3734-
padding bits; see~\ref{class.bit}.
3737+
padding bits; see~\ref{basic.types}.
37353738
\end{note}
37363739
For unsigned narrow
37373740
character types, each possible bit pattern of the value representation

source/classes.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,8 +1306,7 @@
13061306
value of the integral constant expression may
13071307
be larger than the number of bits in the object
13081308
representation~(\ref{basic.types}) of the bit-field's type; in such
1309-
cases the extra bits are used as padding bits and do not participate in
1310-
the value representation~(\ref{basic.types}) of the bit-field.
1309+
cases the extra bits are padding bits~(\ref{basic.types}).
13111310
\indextext{allocation!implementation-defined bit-field}%
13121311
Allocation of bit-fields within a class object is
13131312
\impldef{allocation of bit-fields within a class object}.

source/declarators.tex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,20 +2497,22 @@
24972497
if
24982498
\tcode{T}
24992499
is a (possibly cv-qualified) non-union class type,
2500+
its padding bits~(\ref{basic.types}) are initialized to zero bits and
25002501
each non-static data member,
25012502
each non-virtual base class subobject, and,
25022503
if the object is not a base class subobject,
25032504
each virtual base class subobject
2504-
is zero-initialized and padding is initialized to zero bits;
2505+
is zero-initialized;
25052506

25062507
\item
25072508
if
25082509
\tcode{T}
25092510
is a (possibly cv-qualified) union type,
2511+
its padding bits~(\ref{basic.types}) are initialized to zero bits and
25102512
the
25112513
object's first non-static named
25122514
data member
2513-
is zero-initialized and padding is initialized to zero bits;
2515+
is zero-initialized;
25142516

25152517
\item
25162518
if

0 commit comments

Comments
 (0)