From Jason Turner

[support.types.layout]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp_gs5wlqp/{from.md → to.md} +11 -9
tmp/tmp_gs5wlqp/{from.md → to.md} RENAMED
@@ -2,30 +2,32 @@
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
 
 
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]
8
+
9
+ The expression `offsetof(type, member-designator)` is never
10
+ type-dependent [[temp.dep.expr]] and it is value-dependent
11
+ [[temp.dep.constexpr]] if and only if `type` is dependent. The result of
12
+ applying the `offsetof` macro to a static data member or a function
13
+ member is undefined. No operation invoked by the `offsetof` macro shall
14
+ throw an exception and `noexcept(offsetof(type, member-designator))`
15
+ shall be `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
  [[expr.sizeof]].
24
 
25
+ *Recommended practice:* An implementation should choose types for
26
  `ptrdiff_t` and `size_t` whose integer conversion ranks [[conv.rank]]
27
  are no greater than that of `signed long int` unless a larger size is
28
+ necessary to contain all the possible values.
29
 
30
  The type `max_align_t` is a trivial standard-layout type whose alignment
31
  requirement is at least as great as that of every scalar type, and whose
32
  alignment requirement is supported in every context [[basic.align]].
33