「cpp/error/set unexpected」の版間の差分
提供: cppreference.com
細 (r2.7.3) (ロボットによる 追加: de, en, es, fr, it, pt, ru, zh) |
|||
(2人の利用者による、間の3版が非表示) | |||
1行: | 1行: | ||
− | |||
{{cpp/title|set_unexpected}} | {{cpp/title|set_unexpected}} | ||
{{cpp/error/navbar}} | {{cpp/error/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{header | exception}} |
− | {{ | + | {{ |
− | std::unexpected_handler set_unexpected( std::unexpected_handler f ) | + | | = |
+ | std::unexpected_handler set_unexpected( std::unexpected_handler f ) | ||
}} | }} | ||
− | {{ | + | {{ |
+ | |||
+ | |||
+ | |||
+ | end}} | ||
− | + | {{tt|f}} {{|std::unexpected_handler}} {{|std::unexpected_handler}} を返します。 | |
− | = | + | = |
− | {{ | + | {{}} {{|{{|std::}} {{|std::}} |
− | {{ | + | }} |
− | + | ||
− | === | + | ====== |
− | {{ | + | {{ |
+ | | | | ||
+ | }} | ||
− | === | + | ====== |
− | + | ||
− | === | + | ====== |
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/error/unexpected}} |
− | {{ | + | {{| cpp/error/get_unexpected}} |
− | {{ | + | {{| cpp/error/unexpected_handler}} |
− | {{ | + | {{end}} |
− | + | deenesfritptruzh | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
2018年12月11日 (火) 19:31時点における最新版
ヘッダ <exception> で定義
|
||
std::unexpected_handler set_unexpected( std::unexpected_handler f ) throw(); |
(C++11未満) | |
std::unexpected_handler set_unexpected( std::unexpected_handler f ) noexcept; |
(C++11以上) (非推奨) (C++17で削除) |
|
f
を新しいグローバルな std::unexpected_handler に設定し、以前設定されていた std::unexpected_handler を返します。
この関数はスレッドセーフです。 |
(C++11以上) |
[編集] 引数
f | - | std::unexpected_handler 型の関数へのポインタ、またはヌルポインタ |
[編集] 戻り値
以前設定されていた unexpected ハンドラ、または何も設定されていなかった場合はヌルポインタ値。
[編集] 関連項目
(C++17で削除) |
動的例外指定に違反したときに呼ばれる関数 (関数) |
(C++11)(C++17で削除) |
現在の unexpected_handler を取得します (関数) |
(C++17で削除) |
std::unexpected によって呼ばれる関数の型 (typedef) |