std::tx_exception_C++中文网
定义能用于取消并回滚关键词 atomic_cancel 所初始化的原子事务的异常类型。
若 T 不可平凡复制 (TriviallyCopyable) ,则特化 std::tx_exception<T> 的程序为病式。
成员函数
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_arg 为能通过 what() 访问的解释性字符串并以 value 为能通过 get() 访问的对象构造异常对象。
参数
| value | - | 载荷对象 |
| what_arg | - | 解释性字符串 |
异常
(无)
std::tx_exception::get
| T get() const transaction_safe; |
||
返回异常对象保有的载荷对象。
异常
(无)