名前空間
変種
操作

std::tx_exception

提供: cppreference.com
< cpp‎ | error
 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (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未満)
(C++17未満)
エラー番号
エラー番号
例外のカテゴリ
tx_exception
(TM TS)
アサーション
システムエラー
(C++11)
(C++11)
 
ヘッダ <stdexcept> で定義
template< class T >
class tx_exception : public std::runtime_error;
(TM TS)

キーワード atomic_cancel によって開始されたアトミックトランザクションをキャンセル、ロールバックするために使用できる例外型を定義します。

TTriviallyCopyable でなければ、 std::tx_exception<T> の特殊化は ill-formed です。

目次

[編集] メンバ関数

std::tx_exception::tx_exception

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

T get() const transaction_safe;

例外オブジェクトが保持しているペイロードオブジェクトを返します。

例外

(なし)

std::runtime_error から継承


std::exception から継承

メンバ関数

例外オブジェクトを破棄します
(std::exceptionの仮想パブリックメンバ関数) [edit]
[仮想]
説明文字列を返します
(std::exceptionの仮想パブリックメンバ関数) [edit]