std::terminate_handler
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <exception> 中定义
|
||
typedef void (*terminate_handler)(); |
||
std::terminate_handler
的函数指针类型(指针到函数不带任何参数,并返回void),这是安装和查询的功能std::set_terminate和std::get_terminate,并呼吁通过std::terminate.原文:
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.C + +的实现提供了一个默认
std::terminate_handler
功能,这就要求std::abort()。如果空指针的值是安装(手段std::set_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.[编辑] 另请参阅
异常处理函数调用时失败 原文: function called when exception handling fails (函数) | |
改变功能被称为由std::terminate 原文: changes the function to be called by std::terminate (函数) | |
(C++11) |
获得电流terminate_handler 原文: obtains the current terminate_handler (函数) |