Namespaces
Variants

std:: tx_exception

From cppreference.net
ヘッダーで定義 <stdexcept>
template < class T >
class tx_exception : public std:: runtime_error ;
(TM TS)

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

T TriviallyCopyable でない場合、 std::tx_exception<T> を特殊化するプログラムは不適格です。

目次

メンバー関数

std::tx_exception:: tx_exception

explicit tx_exception ( T value ) transaction_safe ;
(1) (TM TS)
tx_exception ( T value, const std:: string & what_arg ) transaction_safe ;
(2) (TM TS)
tx_exception ( T value, const char * what_arg ) transaction_safe ;
(3) (TM TS)
tx_exception ( const tx_exception & other ) transaction_safe noexcept ;
(4) (TM TS)
1-3) 例外オブジェクトを構築します。 what_arg what() を通じてアクセス可能な説明文字列、 value get() を通じてアクセス可能なオブジェクトです。
4) コピーコンストラクタ。 * this other の両方が動的型 std::tx_exception<T> を持つ場合、 std:: strcmp ( what ( ) , other. what ( ) ) == 0 となります。

パラメータ

value - ペイロードオブジェクト
what_arg - 説明文字列
other - コピーする別の例外オブジェクト

例外

1-3) 実装定義の例外をスローする可能性があります。

std::tx_exception:: operator=

tx_exception & operator = ( const tx_exception & other ) transaction_safe noexcept ;
(TM TS)

内容を other の内容で代入します。 * this other の両方が動的型 std::tx_exception<T> を持つ場合、代入後は std:: strcmp ( what ( ) , other. what ( ) ) == 0 となります。

パラメータ

other - 代入する別の例外オブジェクト

戻り値

* this

std::tx_exception:: get

T get ( ) const transaction_safe ;
(TM TS)

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

例外

実装定義の例外をスローする可能性があります。

std::tx_exception:: what

virtual const char * what ( ) const transaction_safe_dynamic noexcept ;
(TM TS)

説明文字列を返します。

パラメータ

(なし)

戻り値

説明情報を含むNULL終端文字列へのポインタ。

std::exception から継承 std:: exception

メンバ関数

[virtual]
例外オブジェクトを破棄
( std::exception の仮想公開メンバ関数)
[virtual]
説明文字列を返す
( std::exception の仮想公開メンバ関数)