std::tx_exception
提供: cppreference.com
<tbody>
</tbody>
| ヘッダ <stdexcept> で定義
|
||
template< class T > class tx_exception : public std::runtime_error; |
(TM TS) | |
キーワード atomic_cancel によって開始されたアトミックトランザクションをキャンセル、ロールバックするために使用できる例外型を定義します。
T が TriviallyCopyable でなければ、 std::tx_exception<T> の特殊化は ill-formed です。
メンバ関数
std::tx_exception::tx_exception
<tbody> </tbody> explicit tx_exception( T value ) transaction_safe; |
(1) | |
tx_exception( T value, const std::string& what_arg ) transaction_safe; |
(2) | |
tx_exception( T value, const char* what_arg ) transaction_safe; |
(3) | |
what() を通してアクセスできる説明文字列として what_arg を、 get() を通してアクセスできるオブジェクトして value を持つ例外オブジェクトを構築します。
引数
| value | - | ペイロードオブジェクト |
| what_arg | - | 説明文字列 |
例外
(なし)
std::tx_exception::get
<tbody> </tbody> T get() const transaction_safe; |
||
例外オブジェクトが保持しているペイロードオブジェクトを返します。
例外
(なし)
std::runtime_error から継承
std::exception から継承
メンバ関数
[仮想] |
例外オブジェクトを破棄します ( std::exceptionの仮想パブリックメンバ関数)
|
[仮想] |
説明文字列を返します ( std::exceptionの仮想パブリックメンバ関数)
|