8 Expressions [expr]

8.17 Throwing an exception [expr.throw]

throw-expression:
	throw  assignment-expressionopt

A throw-expression is of type void.

Evaluating a throw-expression with an operand throws an exception; the type of the exception object is determined by removing any top-level cv-qualifiers from the static type of the operand and adjusting the type from “array of T” or function type T to “pointer to T”.

A throw-expression with no operand rethrows the currently handled exception. 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: Code that must be executed because of an exception, but cannot completely handle the exception itself, can be written like this:

try {
    // ...
} catch (...) {     // catch all exceptions
  // respond (partially) to exception
  throw;            // pass the exception to some other handler
}

end example]

If no exception is presently being handled, evaluating a throw-expression with no operand calls std​::​​terminate().