std::make_exception_ptr
提供: cppreference.com
<tbody>
</tbody>
| ヘッダ <exception> で定義
|
||
template< class E > std::exception_ptr make_exception_ptr( E e ) noexcept; |
(C++11以上) | |
e のコピーへの参照を保持する std::exception_ptr を作成します。 これは以下のコードが実行されたかのように行われます。
try {
throw e;
} catch(...) {
return std::current_exception();
}
引数
(なし)
戻り値
e のコピーまたは std::bad_alloc のインスタンスまたは std::bad_exception のインスタンス (std::current_exception を参照してください) への参照を保持する std::exception_ptr のインスタンス。
ノート
この引数は値渡しされ、スライシングの対象です。
関連項目
(C++11) |
現在の例外を std::exception_ptr にキャプチャします (関数) |