std::set_unexpected
STD:设置[医]意料之外
Defined in header | | |
---|
std::unexpected_handler set_unexpected( std::unexpected_handler f | | (until C++17) (deprecated since C++11) |
制造f
新的全球std::unexpected_handler
并返回先前安装的std::unexpected_handler
...
This function is thread-safe. Every call to std::set_unexpected synchronizes-with (see std::memory_order) the subsequent calls to std::set_unexpected and std::get_unexpected. | (since C++11) |
---|
参数
f | - | pointer to function of type std::unexpected_handler, or null pointer |
---|
返回值
以前安装的意外处理程序,如果没有安装,则为空指针值。
例外
(none) | (until C++11) |
---|
noexcept specification: noexcept | (since C++11) |
另见
unexpected (until C++17) | function called when dynamic exception specification is violated (function) |
---|
get_unexpected (C++11)(until C++17) | obtains the current unexpected_handler (function) |
unexpected_handler (until C++17) | the type of the function called by std::unexpected (typedef) |
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cppreference.com/w/cpp/Error/set[医]意料之外