A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../tx_exception.html below:

std::tx_exception - cppreference.com

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.

[edit] Member functions 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) Constructs the exception object with what_arg as explanatory string that can be accessed through what() and value as the object that can be accessed through get().

4)

Copy constructor. If

*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

1-3) May throw implementation-defined exceptions.

std::tx_exception::operator=

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

(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

T get() const transaction_safe;

(TM TS)

Returns the payload object held by the exception object.

Exceptions

May throw implementation-defined exceptions.

std::tx_exception::what

virtual const char* what() const transaction_safe_dynamic noexcept;

(TM TS)

Returns the explanatory string.

Parameters

(none)

Return value

Pointer to a null-terminated string with explanatory information.

Inherited from std::exception Member functions destroys the exception object
(virtual public member function of std::exception) [edit] returns an explanatory string
(virtual public member function of std::exception) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4