名前空間
変種
操作

「cpp/error/set unexpected」の版間の差分

提供: cppreference.com
< cpp‎ | error
(r2.7.3) (ロボットによる 追加: de, en, es, fr, it, pt, ru, zh)
 
(2人の利用者による、間の3版が非表示)
1行: 1行:
{{tr_note}}
 
 
{{cpp/title|set_unexpected}}
 
{{cpp/title|set_unexpected}}
 
{{cpp/error/navbar}}
 
{{cpp/error/navbar}}
{{ddcl list begin}}
+
{{begin}}
{{ddcl list header | exception}}
+
{{header | exception}}
{{ddcl list item | 1=
+
{{
std::unexpected_handler set_unexpected( std::unexpected_handler f )
+
| =
 +
std::unexpected_handler set_unexpected( std::unexpected_handler f )
 
}}
 
}}
{{ddcl list end}}
+
{{
 +
 +
 +
 +
end}}
  
{{tr|{{tt|f}}新しいグローバル{{c|std::unexpected_handler}}になり、以前にインストールされ{{c|std::unexpected_handler}}を返します。.|Makes {{tt|f}} the new global {{c|std::unexpected_handler}} and returns the previously installed {{c|std::unexpected_handler}}.}}
+
{{tt|f}} {{|std::unexpected_handler}} {{|std::unexpected_handler}} を返します。
  
===パラメータ===
+
=
{{param list begin}}
+
{{}} {{|{{|std::}} {{|std::}}
{{param list item | f |{{tr| タイプ{{c|std::unexpected_handler}}、またはNULLポインタの関数へのポインタ| pointer to function of type {{c|std::unexpected_handler}}, or null pointer}}}}
+
}}
{{param list end}}
+
  
===値を返します===
+
======
{{tr|以前にインストールした予期しないハンドラ、またはどれもインストールされていない場合は、nullポインタ値.|The previously-installed unexpected handler, or a null pointer value if none was installed.}}
+
{{
 +
| |
 +
}}
  
===例外===
+
======
{{noexcept}}
+
  
===も参照してください===
+
======
{{dcl list begin}}
+
{{begin}}
{{dcl list template | cpp/error/dcl list unexpected}}
+
{{| cpp/error/unexpected}}
{{dcl list template | cpp/error/dcl list get_unexpected}}
+
{{| cpp/error/get_unexpected}}
{{dcl list template | cpp/error/dcl list unexpected_handler}}
+
{{| cpp/error/unexpected_handler}}
{{dcl list end}}
+
{{end}}
  
[[de:cpp/error/set unexpected]]
+
deenesfritptruzh
[[en:cpp/error/set unexpected]]
+
[[es:cpp/error/set unexpected]]
+
[[fr:cpp/error/set unexpected]]
+
[[it:cpp/error/set unexpected]]
+
[[pt:cpp/error/set unexpected]]
+
[[ru:cpp/error/set unexpected]]
+
[[zh:cpp/error/set unexpected]]
+

2018年12月11日 (火) 19:31時点における最新版

 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (C++20)
(C++11)
関係演算子 (C++20で非推奨)
整数比較関数
(C++20)
スワップと型操作
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
一般的な語彙の型
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

初等文字列変換
(C++17)
(C++17)
 
エラー処理
例外処理
例外処理の失敗
(C++17未満)
(C++17未満)
(C++11)(C++17未満)
set_unexpected
(C++17未満)
エラー番号
エラー番号
 
ヘッダ <exception> で定義
(C++11未満)
std::unexpected_handler set_unexpected( std::unexpected_handler f ) noexcept;
(C++11以上)
(非推奨)
(C++17で削除)

f を新しいグローバルな std::unexpected_handler に設定し、以前設定されていた std::unexpected_handler を返します。

この関数はスレッドセーフです。 std::set_unexpected のすべての呼び出しは後続の std::set_unexpected および std::get_unexpected の呼び出しに対して同期します (std::memory_order を参照してください)。

(C++11以上)

[編集] 引数

f - std::unexpected_handler 型の関数へのポインタ、またはヌルポインタ

[編集] 戻り値

以前設定されていた unexpected ハンドラ、または何も設定されていなかった場合はヌルポインタ値。

[編集] 関連項目

(C++17で削除)
動的例外指定に違反したときに呼ばれる関数
(関数) [edit]
(C++11)(C++17で削除)
現在の unexpected_handler を取得します
(関数) [edit]
(C++17で削除)
std::unexpected によって呼ばれる関数の型
(typedef) [edit]