tmp/tmp72xb21d6/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
-
## Throwing an exception <a id="expr.throw">[[expr.throw]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
throw-expression:
|
| 5 |
-
|
| 6 |
```
|
| 7 |
|
| 8 |
A *throw-expression* is of type `void`.
|
| 9 |
|
| 10 |
-
Evaluating a *throw-expression* with an operand throws an exception
|
| 11 |
-
[[except.throw]]
|
| 12 |
removing any top-level *cv-qualifier*s from the static type of the
|
| 13 |
operand and adjusting the type from “array of `T`” or function type `T`
|
| 14 |
to “pointer to `T`”.
|
| 15 |
|
| 16 |
A *throw-expression* with no operand rethrows the currently handled
|
| 17 |
-
exception
|
| 18 |
existing exception object; no new exception object is created. The
|
| 19 |
exception is no longer considered to be caught.
|
| 20 |
|
| 21 |
[*Example 1*:
|
| 22 |
|
|
@@ -33,8 +33,8 @@ try {
|
|
| 33 |
```
|
| 34 |
|
| 35 |
— *end example*]
|
| 36 |
|
| 37 |
If no exception is presently being handled, evaluating a
|
| 38 |
-
*throw-expression* with no operand calls `std::{}terminate()`
|
| 39 |
-
[[except.terminate]]
|
| 40 |
|
|
|
|
| 1 |
+
### Throwing an exception <a id="expr.throw">[[expr.throw]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
throw-expression:
|
| 5 |
+
throw assignment-expressionₒₚₜ
|
| 6 |
```
|
| 7 |
|
| 8 |
A *throw-expression* is of type `void`.
|
| 9 |
|
| 10 |
+
Evaluating a *throw-expression* with an operand throws an exception
|
| 11 |
+
[[except.throw]]; the type of the exception object is determined by
|
| 12 |
removing any top-level *cv-qualifier*s from the static type of the
|
| 13 |
operand and adjusting the type from “array of `T`” or function type `T`
|
| 14 |
to “pointer to `T`”.
|
| 15 |
|
| 16 |
A *throw-expression* with no operand rethrows the currently handled
|
| 17 |
+
exception [[except.handle]]. The exception is reactivated with the
|
| 18 |
existing exception object; no new exception object is created. The
|
| 19 |
exception is no longer considered to be caught.
|
| 20 |
|
| 21 |
[*Example 1*:
|
| 22 |
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
— *end example*]
|
| 36 |
|
| 37 |
If no exception is presently being handled, evaluating a
|
| 38 |
+
*throw-expression* with no operand calls `std::{}terminate()`
|
| 39 |
+
[[except.terminate]].
|
| 40 |
|