From Jason Turner

[support.types.layout]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9a8dhd99/{from.md → to.md} +16 -18
tmp/tmp9a8dhd99/{from.md → to.md} RENAMED
@@ -1,35 +1,33 @@
1
  ### Sizes, alignments, and offsets <a id="support.types.layout">[[support.types.layout]]</a>
2
 
3
  The macro `offsetof(type, member-designator)` has the same semantics as
4
  the corresponding macro in the C standard library header `<stddef.h>`,
5
- but accepts a restricted set of `type` arguments in this International
6
- Standard. Use of the `offsetof` macro with a `type` other than a
7
- standard-layout class (Clause  [[class]]) is
8
- conditionally-supported.[^2] The expression
9
- `offsetof(type, member-designator)` is never type-dependent (
10
- [[temp.dep.expr]]) and it is value-dependent ([[temp.dep.constexpr]])
11
- if and only if `type` is dependent. The result of applying the
12
- `offsetof` macro to a static data member or a function member is
13
- undefined. No operation invoked by the `offsetof` macro shall throw an
14
- exception and `noexcept(offsetof(type, member-designator))` shall be
15
- `true`.
16
 
17
  The type `ptrdiff_t` is an *implementation-defined* signed integer type
18
  that can hold the difference of two subscripts in an array object, as
19
  described in  [[expr.add]].
20
 
21
  The type `size_t` is an *implementation-defined* unsigned integer type
22
- that is large enough to contain the size in bytes of any object.
 
23
 
24
  [*Note 1*: It is recommended that implementations choose types for
25
- `ptrdiff_t` and `size_t` whose integer conversion ranks ([[conv.rank]])
26
  are no greater than that of `signed long int` unless a larger size is
27
  necessary to contain all the possible values. — *end note*]
28
 
29
- The type `max_align_t` is a POD type whose alignment requirement is at
30
- least as great as that of every scalar type, and whose alignment
31
- requirement is supported in every context.
32
 
33
- Alignment ([[basic.align]]), Sizeof ([[expr.sizeof]]), Additive
34
- operators ([[expr.add]]), Free store ([[class.free]]), and ISO C 7.19.
35
 
 
1
  ### Sizes, alignments, and offsets <a id="support.types.layout">[[support.types.layout]]</a>
2
 
3
  The macro `offsetof(type, member-designator)` has the same semantics as
4
  the corresponding macro in the C standard library header `<stddef.h>`,
5
+ but accepts a restricted set of `type` arguments in this document. Use
6
+ of the `offsetof` macro with a `type` other than a standard-layout class
7
+ [[class.prop]] is conditionally-supported.[^2] The expression
8
+ `offsetof(type, member-designator)` is never type-dependent
9
+ [[temp.dep.expr]] and it is value-dependent [[temp.dep.constexpr]] if
10
+ and only if `type` is dependent. The result of applying the `offsetof`
11
+ macro to a static data member or a function member is undefined. No
12
+ operation invoked by the `offsetof` macro shall throw an exception and
13
+ `noexcept(offsetof(type, member-designator))` shall be `true`.
 
 
14
 
15
  The type `ptrdiff_t` is an *implementation-defined* signed integer type
16
  that can hold the difference of two subscripts in an array object, as
17
  described in  [[expr.add]].
18
 
19
  The type `size_t` is an *implementation-defined* unsigned integer type
20
+ that is large enough to contain the size in bytes of any object
21
+ [[expr.sizeof]].
22
 
23
  [*Note 1*: It is recommended that implementations choose types for
24
+ `ptrdiff_t` and `size_t` whose integer conversion ranks [[conv.rank]]
25
  are no greater than that of `signed long int` unless a larger size is
26
  necessary to contain all the possible values. — *end note*]
27
 
28
+ The type `max_align_t` is a trivial standard-layout type whose alignment
29
+ requirement is at least as great as that of every scalar type, and whose
30
+ alignment requirement is supported in every context [[basic.align]].
31
 
32
+ See also: ISO C 7.19
 
33