tmp/tmp1q4uufzz/{from.md → to.md}
RENAMED
|
@@ -1,57 +0,0 @@
|
|
| 1 |
-
## Violating *exception-specification*s <a id="exception.unexpected">[[exception.unexpected]]</a>
|
| 2 |
-
|
| 3 |
-
### Type `unexpected_handler` <a id="unexpected.handler">[[unexpected.handler]]</a>
|
| 4 |
-
|
| 5 |
-
``` cpp
|
| 6 |
-
typedef void (*unexpected_handler)();
|
| 7 |
-
```
|
| 8 |
-
|
| 9 |
-
The type of a *handler function* to be called by `unexpected()` when a
|
| 10 |
-
function attempts to throw an exception not listed in its
|
| 11 |
-
*dynamic-exception-specification*.
|
| 12 |
-
|
| 13 |
-
*Required behavior:* An `unexpected_handler` shall not return. See
|
| 14 |
-
also [[except.unexpected]].
|
| 15 |
-
|
| 16 |
-
*Default behavior:* The implementation’s default `unexpected_handler`
|
| 17 |
-
calls `std::terminate()`.
|
| 18 |
-
|
| 19 |
-
### `set_unexpected` <a id="set.unexpected">[[set.unexpected]]</a>
|
| 20 |
-
|
| 21 |
-
``` cpp
|
| 22 |
-
unexpected_handler set_unexpected(unexpected_handler f) noexcept;
|
| 23 |
-
```
|
| 24 |
-
|
| 25 |
-
*Effects:* Establishes the function designated by `f` as the current
|
| 26 |
-
`unexpected_handler`.
|
| 27 |
-
|
| 28 |
-
It is unspecified whether a null pointer value designates the default
|
| 29 |
-
`unexpected_handler`.
|
| 30 |
-
|
| 31 |
-
*Returns:* The previous `unexpected_handler`.
|
| 32 |
-
|
| 33 |
-
### `get_unexpected` <a id="get.unexpected">[[get.unexpected]]</a>
|
| 34 |
-
|
| 35 |
-
``` cpp
|
| 36 |
-
unexpected_handler get_unexpected() noexcept;
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
*Returns:* The current `unexpected_handler`. This may be a null pointer
|
| 40 |
-
value.
|
| 41 |
-
|
| 42 |
-
### `unexpected` <a id="unexpected">[[unexpected]]</a>
|
| 43 |
-
|
| 44 |
-
``` cpp
|
| 45 |
-
[[noreturn]] void unexpected();
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
*Remarks:* Called by the implementation when a function exits via an
|
| 49 |
-
exception not allowed by its
|
| 50 |
-
*exception-specification* ([[except.unexpected]]), in effect after
|
| 51 |
-
evaluating the throw-expression ([[unexpected.handler]]). May also be
|
| 52 |
-
called directly by the program.
|
| 53 |
-
|
| 54 |
-
*Effects:* Calls the current `unexpected_handler` function. A default
|
| 55 |
-
`unexpected_handler` is always considered a callable handler in this
|
| 56 |
-
context.
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|