tmp/tmpo6dulzkk/{from.md → to.md}
RENAMED
|
@@ -4,12 +4,12 @@
|
|
| 4 |
using exception_ptr = unspecified;
|
| 5 |
```
|
| 6 |
|
| 7 |
The type `exception_ptr` can be used to refer to an exception object.
|
| 8 |
|
| 9 |
-
`exception_ptr`
|
| 10 |
-
|
| 11 |
|
| 12 |
Two non-null values of type `exception_ptr` are equivalent and compare
|
| 13 |
equal if and only if they refer to the same exception.
|
| 14 |
|
| 15 |
The default constructor of `exception_ptr` produces the null value of
|
|
@@ -36,14 +36,14 @@ introduce a data race. — *end note*]
|
|
| 36 |
``` cpp
|
| 37 |
exception_ptr current_exception() noexcept;
|
| 38 |
```
|
| 39 |
|
| 40 |
*Returns:* An `exception_ptr` object that refers to the currently
|
| 41 |
-
handled exception
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
needs to allocate memory and the attempt fails, it returns an
|
| 46 |
`exception_ptr` object that refers to an instance of `bad_alloc`. It is
|
| 47 |
unspecified whether the return values of two successive calls to
|
| 48 |
`current_exception` refer to the same exception object.
|
| 49 |
|
|
@@ -61,11 +61,11 @@ to avoid infinite recursion. — *end note*]
|
|
| 61 |
|
| 62 |
``` cpp
|
| 63 |
[[noreturn]] void rethrow_exception(exception_ptr p);
|
| 64 |
```
|
| 65 |
|
| 66 |
-
*
|
| 67 |
|
| 68 |
*Throws:* The exception object to which `p` refers.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
template<class E> exception_ptr make_exception_ptr(E e) noexcept;
|
|
|
|
| 4 |
using exception_ptr = unspecified;
|
| 5 |
```
|
| 6 |
|
| 7 |
The type `exception_ptr` can be used to refer to an exception object.
|
| 8 |
|
| 9 |
+
`exception_ptr` meets the requirements of *Cpp17NullablePointer*
|
| 10 |
+
([[cpp17.nullablepointer]]).
|
| 11 |
|
| 12 |
Two non-null values of type `exception_ptr` are equivalent and compare
|
| 13 |
equal if and only if they refer to the same exception.
|
| 14 |
|
| 15 |
The default constructor of `exception_ptr` produces the null value of
|
|
|
|
| 36 |
``` cpp
|
| 37 |
exception_ptr current_exception() noexcept;
|
| 38 |
```
|
| 39 |
|
| 40 |
*Returns:* An `exception_ptr` object that refers to the currently
|
| 41 |
+
handled exception [[except.handle]] or a copy of the currently handled
|
| 42 |
+
exception, or a null `exception_ptr` object if no exception is being
|
| 43 |
+
handled. The referenced object shall remain valid at least as long as
|
| 44 |
+
there is an `exception_ptr` object that refers to it. If the function
|
| 45 |
needs to allocate memory and the attempt fails, it returns an
|
| 46 |
`exception_ptr` object that refers to an instance of `bad_alloc`. It is
|
| 47 |
unspecified whether the return values of two successive calls to
|
| 48 |
`current_exception` refer to the same exception object.
|
| 49 |
|
|
|
|
| 61 |
|
| 62 |
``` cpp
|
| 63 |
[[noreturn]] void rethrow_exception(exception_ptr p);
|
| 64 |
```
|
| 65 |
|
| 66 |
+
*Preconditions:* `p` is not a null pointer.
|
| 67 |
|
| 68 |
*Throws:* The exception object to which `p` refers.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
template<class E> exception_ptr make_exception_ptr(E e) noexcept;
|