Created on 2001-04-03.00:00:00 last changed 171 months ago
Rationale:
Infinite recursion is to be expected: users who set the terminate handler to terminate are explicitly asking for terminate to call itself.
According to section 18.7.3.3 of the standard, std::terminate() is supposed to call the terminate_handler in effect immediately after evaluating the throw expression.
Question: what if the terminate_handler in effect is itself std::terminate?
For example:
#include <exception> int main () { std::set_terminate(std::terminate); throw 5; return 0; }
Is the implementation allowed to go into an infinite loop?
I think the same issue applies to std::set_unexpected.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2206 |
2001-04-03 00:00:00 | admin | create |