Section: 18.104.22.168 [terminate] Status: NAD Submitter: Detlef Vollmann Opened: 2001-04-11 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [terminate].
View all issues with NAD status.
The standard appears to contradict itself about whether the stack is unwound when the implementation calls terminate().
Calls the terminate_handler function in effect immediately after evaluating the throw-expression (lib.terminate.handler), if called by the implementation [...]
So the stack is guaranteed not to be unwound.
But from 15.3p9:
[...]whether or not the stack is unwound before this call to terminate() is implementation-defined (except.terminate).
And 15.5.1 actually defines that in most cases the stack is unwound.
There is definitely no contradiction between the core and library clauses; nothing in the core clauses says that stack unwinding happens after terminate is called. 22.214.171.124p2 does not say anything about when terminate() is called; it merely specifies which terminate_handler is used.