Namespaces
Variants
Views
Actions

std::terminate_handler

From cppreference.com
< cpp‎ | error
Revision as of 14:54, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <exception>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td class="t-dcl-nopad">
typedef void (*terminate_handler)();
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

std::terminate_handler is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std::set_terminate and std::get_terminate and called by std::terminate.

The C++ implementation provides a default std::terminate_handler function, which calls std::abort(). If the null pointer value is installed (by means of std::set_terminate), the implementation may restore the default handler instead.

See also

Template:cpp/error/dcl list terminateTemplate:cpp/error/dcl list set terminateTemplate:cpp/error/dcl list get terminate