std:: tx_exception
|
Défini dans l'en-tête
<stdexcept>
|
||
|
template
<
class
T
>
class tx_exception : public std:: runtime_error ; |
(TM TS) | |
Définit un type d'exception qui peut être utilisé pour annuler et restaurer une transaction atomique initiée par le mot-clé atomic_cancel .
Si
T
n'est pas
TriviallyCopyable
, le programme qui spécialise
std::tx_exception<T>
est mal formé.
Table des matières |
Fonctions membres
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) |
std::tx_exception<T>
alors
std::
strcmp
(
what
(
)
, other.
what
(
)
)
==
0
.
Paramètres
| value | - | objet de charge utile |
| what_arg | - | chaîne explicative |
| other | - | autre objet d'exception à copier |
Exceptions
std::tx_exception:: operator=
|
tx_exception
&
operator
=
(
const
tx_exception
&
other
)
transaction_safe
noexcept
;
|
(TM TS) | |
Affecte le contenu avec celui de
other
. Si
*
this
et
other
ont tous deux le type dynamique
std::tx_exception<T>
alors
std::
strcmp
(
what
(
)
, other.
what
(
)
)
==
0
après l'affectation.
Paramètres
| other | - | un autre objet exception à affecter |
Valeur de retour
* this
std::tx_exception:: get
|
T get
(
)
const
transaction_safe
;
|
(TM TS) | |
Retourne l'objet de charge utile détenu par l'objet d'exception.
Exceptions
Peut lever des exceptions définies par l'implémentation.
std::tx_exception:: what
|
virtual
const
char
*
what
(
)
const
transaction_safe_dynamic
noexcept
;
|
(TM TS) | |
Retourne la chaîne explicative.
Paramètres
(aucun)
Valeur de retour
Pointeur vers une chaîne terminée par un caractère nul contenant des informations explicatives.
Hérité de std:: runtime_error
Hérité de std:: exception
Fonctions membres
|
[virtual]
|
détruit l'objet exception
(fonction membre publique virtuelle de
std::exception
)
|
|
[virtual]
|
retourne une chaîne explicative
(fonction membre publique virtuelle de
std::exception
)
|