名前空間
変種
操作

std::make_exception_ptr

提供: cppreference.com
< cpp‎ | error

 
 
 
 
ヘッダ <exception> で定義
template< class E >
std::exception_ptr make_exception_ptr( E e )
(C++11およびそれ以降)
実行しているかのように、std::exception_ptrのコピーへの参照を保持eを作成します
Original:
Creates an std::exception_ptr that holds a reference to a copy of e, as if by executing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

try {
    throw e;
} catch(...) {
    return std::current_exception();
}

目次

[編集] パラメータ

(なし)

[編集] 値を返します

std::exception_ptrのコピー、またはeのインスタンスまたはstd::bad_allocのインスタンスへの参照を保持してstd::bad_exceptionのインスタンス(std::current_exceptionを参照してください)​​.
Original:
An instance of std::exception_ptr holding a reference to the copy of e, or to an instance of std::bad_alloc or to an instance of std::bad_exception (see std::current_exception).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 例外

noexcept 指定:  
noexcept
  

[編集] 参照

現在の例外を std::exception_ptr にキャプチャします
(関数) [edit]