Created on2012-05-11.00:00:00 last changed145 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
evaluationof the expression to be thrownthe initialization of theexception object but before theexception is caughtactivation of a handler for the exception, calls a functionthat 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(); // callsstd::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 ofthe expression to be thrown but before the exception is caught, callsa function that exits via an exception,std::terminate iscalled (14.6.2 [except.terminate]).
This wording was overlooked in the resolution forissue 475 and should be changed, along with thefollowing example, to indicate thatstd::terminate will becalled for an uncaught exception only after initialization of theexception 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 | |