[expr.throw] (original) (raw)
7 Expressions [expr]
7.6 Compound expressions [expr.compound]
7.6.18 Throwing an exception [expr.throw]
A throw-expression is of type void.
The array-to-pointer ([conv.array]) and function-to-pointer ([conv.func]) standard conversions are performed on the operand.
The type of the exception object is determined by removing any top-level cv-qualifiers from the type of the (possibly converted) operand.
The exception object is copy-initialized ([dcl.init.general]) from the (possibly converted) operand.
Athrow-expressionwith no operand rethrows the currently handled exception ([except.handle]).
If no exception is presently being handled, the function std::terminate is invoked ([except.terminate]).
Otherwise, the exception is reactivated with the existing exception object; no new exception object is created.
The exception is no longer considered to be caught.
[Example 1:
An exception handler that cannot completely handle the exception itself can be written like this:try { } catch (...) { throw; }
— _end example_]