On this page
std::tx_exception
Defined in header <stdexcept> |
||
---|---|---|
|
(TM TS) |
Defines an exception type that can be used to cancel and roll back an atomic transaction initiated by the keyword atomic_cancel
.
If T
is not TriviallyCopyable, the program that specializes std::tx_exception<T>
is ill-formed.
Member functions
std::tx_exception::tx_exception
|
(1) | (TM TS) |
|
(2) | (TM TS) |
|
(3) | (TM TS) |
|
(4) | (TM TS) |
what_arg
as explanatory string that can be accessed through what()
and value
as the object that can be accessed through get()
.
*this
and other
both have dynamic type std::tx_exception<T>
then std::strcmp(what(), other.what()) == 0
.
Parameters
value | - | payload object |
what_arg | - | explanatory string |
other | - | another exception object to copy |
Exceptions
std::tx_exception::operator=
|
(TM TS) |
Assigns the contents with those of other
. If *this
and other
both have dynamic type std::tx_exception<T>
then std::strcmp(what(), other.what()) == 0
after assignment.
Parameters
other | - | another exception object to assign with |
Return value
*this
std::tx_exception::get
|
(TM TS) |
Returns the payload object held by the exception object.
Exceptions
May throw implementation-defined exceptions.
std::tx_exception::what
|
(TM TS) |
Returns the explanatory string.
Parameters
(none)
Return value
Pointer to a null-terminated string with explanatory information.
Inherited from std::runtime_error
Inherited from std::exception
Member functions
[virtual]
|
destroys the exception object (virtual public member function of std::exception ) |
[virtual]
|
returns an explanatory string (virtual public member function of std::exception ) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/error/tx_exception