std::unexpected
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <exception> 中定义
|
||
[[noreturn]] void unexpected(); |
(已弃用) | |
std::unexpected()
被称为C + +运行时被侵犯时,动态异常规范:从函数的异常规范禁止这种类型的异常抛出一个异常.原文:
std::unexpected()
is called by the C++ runtime when a 动态异常规范 is violated: an exception is thrown from a function whose exception specification forbids exceptions of this type.std::unexpected()
也可以直接从程序中调用.原文:
std::unexpected()
may also be called directly from the program.在这两种情况下,
std::unexpected
调用当前安装的std::unexpected_handler。默认std::unexpected_handler调用std::terminate.原文:
In either case,
std::unexpected
calls the currently installed std::unexpected_handler. The default std::unexpected_handler calls std::terminate.目录 |
[编辑] 参数
(无)
[编辑] 返回值
(无)
[编辑] 例外
[编辑] 另请参阅
(已弃用) |
std::unexpected所调用的函数的类型的 原文: the type of the function called by std::unexpected (typedef) |