|
|
Defined in header <exception> | ||
typedefvoid(*terminate_handler)(); | ||
std::terminate_handler
is the function pointer type (pointer to function that takes no arguments and returnsvoid), which is installed and queried by the functionsstd::set_terminate andstd::get_terminate and called bystd::terminate.
Astd::terminate_handler
shall terminate execution of the program without returning to the caller, otherwise the behavior is undefined.
The C++ implementation provides a defaultstd::terminate_handler
function, which callsstd::abort(). If the null pointer value is installed (by means ofstd::set_terminate), the implementation may restore the default handler instead.
This section is incomplete Reason: no example |
function called when exception handling fails (function)[edit] | |
changes the function to be called bystd::terminate (function)[edit] | |
(C++11) | obtains the current terminate_handler (function)[edit] |