This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


814. Attribute to indicate that a function throws nothing

Section: 9.12  [dcl.attr]     Status: CD2     Submitter: US     Date: 3 March, 2009

N2800 comment US 40

[Voted into WP at March, 2010 meeting as paper N3050.]

A function with an exception-specification of throw() must be given a catch(...) clause to enforce its contract, i.e., to call std::unexpected() if it exits with an exception. It would be useful to have an attribute indicating that the function really does throw nothing and thus that the catch(...) clause need not be generated.

(See also issue 830.)

Proposed resolution (September, 2009):

See paper PL22.16/09-0162 = WG21 N2972.