Created on 2012-05-11.00:00:00 last changed 131 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (August, 2012):
Change 14.2 [except.throw] paragraph 7 as follows:
If the exception handling mechanism, after completing
evaluation of the expression to be thrownthe initialization of the exception object but before theexception is caughtactivation of a handler for the exception, calls a function that exits via an exception, std::terminate is called (14.6.2 [except.terminate]). [Example:struct C { C() { } C(const C&) {throw 0; }if (std::uncaught_exception()) { throw 0; // throw during copy to handler's exception-declaration object (14.4 [except.handle]) } } }; int main() { try { throw C(); // calls std::terminate() if construction of the handler's // exception-declaration object is not elided (11.4.5.3 [class.copy.ctor]) } catch(C) { } }—end example]
According to 14.2 [except.throw] paragraph 7,
If the exception handling mechanism, after completing evaluation of the expression to be thrown but before the exception is caught, calls a function that exits via an exception, std::terminate is called (14.6.2 [except.terminate]).
This wording was overlooked in the resolution for issue 475 and should be changed, along with the following example, to indicate that std::terminate will be called for an uncaught exception only after initialization of the exception object is complete.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4433 |
2013-05-03 00:00:00 | admin | set | status: ready -> dr |
2012-11-03 00:00:00 | admin | set | status: tentatively ready -> ready |
2012-09-24 00:00:00 | admin | set | messages: + msg3886 |
2012-05-11 00:00:00 | admin | create |