This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


1171. Partial stack unwinding with noexcept violation

Section: 14.6.2  [except.terminate]     Status: C++11     Submitter: Merrill     Date: 2010-08-04

[Voted into the WP at the November, 2010 meeting.]

The current wording of 14.6.2 [except.terminate] paragraph 2 makes it sound as if stack unwinding in the case of a noexcept violation is an all-or-nothing proposition. It would be useful to be able to partially unwind the stack, in particular, not to call destructors for the function containing the noexcept-specification.

Proposed resolution (August, 2010):

Change 14.6.2 [except.terminate] paragraph 2 as follows:

...In the situation where the search for a handler (14.4 [except.handle]) encounters the outermost block of a function with a noexcept-specification that does not allow the exception (14.5 [except.spec]), it is implementation-defined whether the stack is unwound, unwound partially, or not unwound at all before std::terminate() is called. In all other situations, the stack shall not be unwound...