...
Consequently you should take steps to prevent std::terminate()
from being invoked for two reasons. First because it involves implementation-defined behavior. Second, if the stack is not unwound on your platform, than RAII is violated. That is, destructors are not called, allocated memory is not freed, opened files are not flushed and closed, etc. See also ERR04-CPP. Choose an appropriate termination strategy.
Non-Compliant Code Example (main()
)
...