Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added ref to EX1

The std::abort(), std::quick_exit(), and std::_Exit() functions are used to terminate the program in an immediate fashion. They do so without calling exit handlers registered with std::atexit() and without executing destructors for objects with automatic, thread, or static storage duration. Whether open streams with unwritten buffered data are flushed, open streams are closed, or temporary files are removed [ISO/IEC 9899:1999] is implementation defined. Because these functions can leave external resources in an indeterminate state, they should be called explicitly only in direct response to a critical error in the application; see ERR50-CPP-EX1 for more information.

The std::terminate() function calls the current terminate_handler function, which defaults to calling std::abort().

...