Created on 2009-03-03.00:00:00 last changed 143 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (September, 2009):
Change 14.2 [except.throw] paragraph 4 as follows:
The memory for the
temporary copy of the exception being thrownis allocated in an unspecified way, except as noted in 126.96.36.199.2 [basic.stc.dynamic.allocation]. The temporary persists as long as there is a handler being executed for that exception. In particular, ifa handler exits by executing a throw; statement, that passes controlto another handler for the same exception , so the temporary remains. Whenthe last remaining active handler for the exception exits by any means other than throw; the temporary object is destroyed and theimplementation may deallocate the memory for the temporaryobject; any such deallocation is done in an unspecified way. The destruction occurs immediately after the destruction of the object declared in the exception-declaration in the handler.
14.2 [except.throw] paragraph 4 says,
When the last remaining active handler for the exception exits by any means other than throw; the temporary object is destroyed and the implementation may deallocate the memory for the temporary object...
With std::current_exception() (17.9.7 [propagation] paragraph 7), it might be possible to refer to the exception object after its last handler exits (if the exception object is not copied). The text needs to be updated to allow for that possibility.
|2010-03-29 00:00:00||admin||set||messages: + msg2746|
|2010-03-29 00:00:00||admin||set||status: ready -> cd2|
|2009-11-08 00:00:00||admin||set||status: review -> ready|
|2009-09-29 00:00:00||admin||set||messages: + msg2308|
|2009-09-29 00:00:00||admin||set||status: drafting -> review|
|2009-08-03 00:00:00||admin||set||status: open -> drafting|