From Jason Turner

[conv.ptr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpm7urp6a_/{from.md → to.md} +16 -19
tmp/tmpm7urp6a_/{from.md → to.md} RENAMED
@@ -1,29 +1,26 @@
1
  ## Pointer conversions <a id="conv.ptr">[[conv.ptr]]</a>
2
 
3
- A *null pointer constant* is an integral constant expression (
4
- [[expr.const]]) prvalue of integer type that evaluates to zero or a
5
- prvalue of type `std::nullptr_t`. A null pointer constant can be
6
- converted to a pointer type; the result is the *null pointer value* of
7
- that type and is distinguishable from every other value of object
8
- pointer or function pointer type. Such a conversion is called a *null
9
- pointer conversion*. Two null pointer values of the same type shall
10
- compare equal. The conversion of a null pointer constant to a pointer to
11
- cv-qualified type is a single conversion, and not the sequence of a
12
- pointer conversion followed by a qualification conversion (
13
- [[conv.qual]]). A null pointer constant of integral type can be
14
- converted to a prvalue of type `std::nullptr_t`. The resulting prvalue
15
- is not a null pointer value.
16
 
17
  A prvalue of type “pointer to *cv* `T`,” where `T` is an object type,
18
  can be converted to a prvalue of type “pointer to *cv* `void`”. The
19
- result of converting a pointer to *cv* `T`” to a pointer to *cv*
20
- `void`” points to the start of the storage location where the object of
21
- type `T` resides, as if the object is a most derived object (
22
- [[intro.object]]) of type `T` (that is, not a base class subobject). The
23
- null pointer value is converted to the null pointer value of the
24
- destination type.
25
 
26
  A prvalue of type “pointer to *cv* `D`”, where `D` is a class type, can
27
  be converted to a prvalue of type “pointer to *cv* `B`”, where `B` is a
28
  base class (Clause  [[class.derived]]) of `D`. If `B` is an inaccessible
29
  (Clause  [[class.access]]) or ambiguous ([[class.member.lookup]]) base
 
1
  ## Pointer conversions <a id="conv.ptr">[[conv.ptr]]</a>
2
 
3
+ A *null pointer constant* is an integer literal ([[lex.icon]]) with
4
+ value zero or a prvalue of type `std::nullptr_t`. A null pointer
5
+ constant can be converted to a pointer type; the result is the *null
6
+ pointer value* of that type and is distinguishable from every other
7
+ value of object pointer or function pointer type. Such a conversion is
8
+ called a *null pointer conversion*. Two null pointer values of the same
9
+ type shall compare equal. The conversion of a null pointer constant to a
10
+ pointer to cv-qualified type is a single conversion, and not the
11
+ sequence of a pointer conversion followed by a qualification
12
+ conversion ([[conv.qual]]). A null pointer constant of integral type
13
+ can be converted to a prvalue of type `std::nullptr_t`. The resulting
14
+ prvalue is not a null pointer value.
 
15
 
16
  A prvalue of type “pointer to *cv* `T`,” where `T` is an object type,
17
  can be converted to a prvalue of type “pointer to *cv* `void`”. The
18
+ result of converting a non-null pointer value of a pointer to object
19
+ type to a “pointer to *cv* `void`” represents the address of the same
20
+ byte in memory as the original pointer value. The null pointer value is
21
+ converted to the null pointer value of the destination type.
 
 
22
 
23
  A prvalue of type “pointer to *cv* `D`”, where `D` is a class type, can
24
  be converted to a prvalue of type “pointer to *cv* `B`”, where `B` is a
25
  base class (Clause  [[class.derived]]) of `D`. If `B` is an inaccessible
26
  (Clause  [[class.access]]) or ambiguous ([[class.member.lookup]]) base