Description
Exceptions are a control flow, just like if
, while
, and goto
. They belong somewhere in [stmt], with the exception (no pun) of [except.throw] as a throw_expression is literally an expression, so move [except.throw] to follow [expr.delete] as a unary operator.
Exception specifications are nothing to do with control flow, and are entirely a function specifier that feeds the noexcept
operator, so belong somewhere in [dcl]. See #7308.
The specification for the uncaught_exceptions
function is the wrong place to augment the rules for when an exception is active. They belong in [except.handle] around p9/p10 that define what it means for an exception to be active, leaving the library wording to define the semantics of this function without duplication. See #7276.
The terminate
function is now used for more than just failures of the exception handling machinery. Its description should be updated accordingly. See #7281.
Once the specification of terminate
has been updated, it is no longer specifically an exception feature, and should be relocated to the end of [basic.start] Start and termination. That completes dissolving this clause into the rest of the standard.
Jens noted that exceptions really did belong in [stmt] from the start, but they were still an experimental feature as C++ was being standardized in 1997, unlike most the rest of that clause, so were conservatively given their own top level clause in case of complications. We are not past time to put them back where they belong.
Note that it would be good to land #7276 for C++26, as that will complete moving all the specification of handling an activ exception into a single place. While it would be nice to also land #7281 and resolve its fix-me, that is less impactful.