tmp/tmprq3jyonk/{from.md → to.md}
RENAMED
|
@@ -1,23 +1,25 @@
|
|
| 1 |
#### *Cpp17NullablePointer* requirements <a id="nullablepointer.requirements">[[nullablepointer.requirements]]</a>
|
| 2 |
|
| 3 |
A *Cpp17NullablePointer* type is a pointer-like type that supports null
|
| 4 |
-
values. A type `P` meets the *Cpp17NullablePointer* requirements if
|
| 5 |
|
| 6 |
- `P` meets the *Cpp17EqualityComparable*, *Cpp17DefaultConstructible*,
|
| 7 |
*Cpp17CopyConstructible*, *Cpp17CopyAssignable*, *Cpp17Swappable*, and
|
| 8 |
*Cpp17Destructible* requirements,
|
| 9 |
- the expressions shown in [[cpp17.nullablepointer]] are valid and have
|
| 10 |
the indicated semantics, and
|
| 11 |
- `P` meets all the other requirements of this subclause.
|
| 12 |
|
| 13 |
A value-initialized object of type `P` produces the null value of the
|
| 14 |
type. The null value shall be equivalent only to itself. A
|
| 15 |
-
default-initialized object of type `P` may have an indeterminate
|
|
|
|
| 16 |
|
| 17 |
[*Note 1*: Operations involving indeterminate values can cause
|
| 18 |
-
undefined behavior
|
|
|
|
| 19 |
|
| 20 |
An object `p` of type `P` can be contextually converted to `bool`
|
| 21 |
[[conv]]. The effect shall be as if `p != nullptr` had been evaluated in
|
| 22 |
place of `p`.
|
| 23 |
|
|
|
|
| 1 |
#### *Cpp17NullablePointer* requirements <a id="nullablepointer.requirements">[[nullablepointer.requirements]]</a>
|
| 2 |
|
| 3 |
A *Cpp17NullablePointer* type is a pointer-like type that supports null
|
| 4 |
+
values. A type `P` meets the *Cpp17NullablePointer* requirements if
|
| 5 |
|
| 6 |
- `P` meets the *Cpp17EqualityComparable*, *Cpp17DefaultConstructible*,
|
| 7 |
*Cpp17CopyConstructible*, *Cpp17CopyAssignable*, *Cpp17Swappable*, and
|
| 8 |
*Cpp17Destructible* requirements,
|
| 9 |
- the expressions shown in [[cpp17.nullablepointer]] are valid and have
|
| 10 |
the indicated semantics, and
|
| 11 |
- `P` meets all the other requirements of this subclause.
|
| 12 |
|
| 13 |
A value-initialized object of type `P` produces the null value of the
|
| 14 |
type. The null value shall be equivalent only to itself. A
|
| 15 |
+
default-initialized object of type `P` may have an indeterminate or
|
| 16 |
+
erroneous value.
|
| 17 |
|
| 18 |
[*Note 1*: Operations involving indeterminate values can cause
|
| 19 |
+
undefined behavior, and operations involving erroneous values can cause
|
| 20 |
+
erroneous behavior [[basic.indet]]. — *end note*]
|
| 21 |
|
| 22 |
An object `p` of type `P` can be contextually converted to `bool`
|
| 23 |
[[conv]]. The effect shall be as if `p != nullptr` had been evaluated in
|
| 24 |
place of `p`.
|
| 25 |
|