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


2042. Exceptions and deallocation functions

Section: 6.7.6.5.3  [basic.stc.dynamic.deallocation]     Status: drafting     Submitter: Richard Smith     Date: 2014-11-13

According to 6.7.6.5.3 [basic.stc.dynamic.deallocation] paragraph 3,

If a deallocation function terminates by throwing an exception, the behavior is undefined.

This seems to be in conflict with the provisions of 14.5 [except.spec]: if a deallocation function throws an exception that is not allowed by its exception-specification, 14.5 [except.spec] paragraph 10 would appear to give the program defined behavior (calling std::unexpected() or std::terminate()). (Note that 14.5 [except.spec] paragraph 18 explicitly allows an explicit exception-specification for a deallocation function.)