Section: 99 [unexpected] Status: NAD Submitter: Vyatcheslav Sysoltsev Opened: 2003-09-29 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View all issues with NAD status.
Discussion:
Clause [except.unexpected] paragraph 1 says that "void unexpected(); is called (18.7.2) immediately after completing the stack unwinding for the former function", but 18.7.2.4 (Effects) says that "void unexpected(); . . . Calls the unexpected_handler function in effect immediately after evaluating the throwexpression (18.7.2.2),". Isn't here a contradiction: 15.5.2 requires stack have been unwound when in void unexpected() and therefore in unexpected_handler but 18.7.2.4 claims that unexpected_handler is called "in effect immediately" after evaluation of throw expression is finished, so there is no space left for stack to be unwound therefore? I think the phrase "in effect immediately" should be removed from the standard because it brings ambiguity in understanding.
Proposed resolution:
Rationale:
There is no contradiction. The phrase "in effect immediately" is just to clarify which handler is to be called.