From Jason Turner

[class.bit]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpoei2agzd/{from.md → to.md} +13 -12
tmp/tmpoei2agzd/{from.md → to.md} RENAMED
@@ -6,20 +6,21 @@ A *member-declarator* of the form
6
  identifierₒₚₜ attribute-specifier-seqₒₚₜ ':' constant-expression brace-or-equal-initializerₒₚₜ
7
  ```
8
 
9
  specifies a bit-field. The optional *attribute-specifier-seq* appertains
10
  to the entity being declared. A bit-field shall not be a static member.
11
- A bit-field shall have integral or enumeration type; the bit-field
12
- semantic property is not part of the type of the class member. The
13
- *constant-expression* shall be an integral constant expression with a
14
- value greater than or equal to zero and is called the *width* of the
15
- bit-field. If the width of a bit-field is larger than the width of the
16
- bit-field’s type (or, in case of an enumeration type, of its underlying
17
- type), the extra bits are padding bits [[basic.types]]. Allocation of
18
- bit-fields within a class object is *implementation-defined*. Alignment
19
- of bit-fields is *implementation-defined*. Bit-fields are packed into
20
- some addressable allocation unit.
 
21
 
22
  [*Note 1*: Bit-fields straddle allocation units on some machines and
23
  not on others. Bit-fields are assigned right-to-left on some machines,
24
  left-to-right on others. — *end note*]
25
 
@@ -34,12 +35,12 @@ externally-imposed layouts. — *end note*]
34
  As a special case, an unnamed bit-field with a width of zero specifies
35
  alignment of the next bit-field at an allocation unit boundary. Only
36
  when declaring an unnamed bit-field may the width be zero.
37
 
38
  The address-of operator `&` shall not be applied to a bit-field, so
39
- there are no pointers to bit-fields. A non-const reference shall not be
40
- bound to a bit-field [[dcl.init.ref]].
41
 
42
  [*Note 3*: If the initializer for a reference of type `const` `T&` is
43
  an lvalue that refers to a bit-field, the reference is bound to a
44
  temporary initialized to hold the value of the bit-field; the reference
45
  is not bound to the bit-field directly. See 
 
6
  identifierₒₚₜ attribute-specifier-seqₒₚₜ ':' constant-expression brace-or-equal-initializerₒₚₜ
7
  ```
8
 
9
  specifies a bit-field. The optional *attribute-specifier-seq* appertains
10
  to the entity being declared. A bit-field shall not be a static member.
11
+ A bit-field shall have integral or (possibly cv-qualified) enumeration
12
+ type; the bit-field semantic property is not part of the type of the
13
+ class member. The *constant-expression* shall be an integral constant
14
+ expression with a value greater than or equal to zero and is called the
15
+ *width* of the bit-field. If the width of a bit-field is larger than the
16
+ width of the bit-field’s type (or, in case of an enumeration type, of
17
+ its underlying type), the extra bits are padding bits
18
+ [[term.padding.bits]]. Allocation of bit-fields within a class object is
19
+ *implementation-defined*. Alignment of bit-fields is
20
+ *implementation-defined*. Bit-fields are packed into some addressable
21
+ allocation unit.
22
 
23
  [*Note 1*: Bit-fields straddle allocation units on some machines and
24
  not on others. Bit-fields are assigned right-to-left on some machines,
25
  left-to-right on others. — *end note*]
26
 
 
35
  As a special case, an unnamed bit-field with a width of zero specifies
36
  alignment of the next bit-field at an allocation unit boundary. Only
37
  when declaring an unnamed bit-field may the width be zero.
38
 
39
  The address-of operator `&` shall not be applied to a bit-field, so
40
+ there are no pointers to bit-fields. A non-const reference shall not
41
+ bind to a bit-field [[dcl.init.ref]].
42
 
43
  [*Note 3*: If the initializer for a reference of type `const` `T&` is
44
  an lvalue that refers to a bit-field, the reference is bound to a
45
  temporary initialized to hold the value of the bit-field; the reference
46
  is not bound to the bit-field directly. See