std::atomic::store
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> void store( T desired, memory_order = std::memory_order_seq_cst ); |
(depuis C++11) | |
void store( T desired, memory_order = std::memory_order_seq_cst ) volatile; |
(depuis C++11) | |
Atomiquement remplace la valeur actuelle avec
desired. La mémoire est affectée en fonction de la valeur de memory_order .Original:
Atomically replaces the current value with
desired. Memory is affected according to the value of memory_order.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
memory_order doit être l'un des std::memory_order_relaxed, std::memory_order_release ou std::memory_order_seq_cst. Sinon le comportement est indéfini .Original:
memory_order must be one of std::memory_order_relaxed, std::memory_order_release or std::memory_order_seq_cst. Otherwise the behavior is undefined.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Paramètres
| desired | - | la valeur à stocker dans une variable atomique
Original: the value to store into the atomic variable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| memory_order | - | contraintes d'ordre pour faire respecter la mémoire
Original: memory order constraints to enforce The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Exceptions
Voir aussi
stocke une valeur dans un objet atomique Original: stores a value into an atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
(C++11) (C++11) |
remplace atomiquement la valeur de l'objet atomique avec un argument non-atomique Original: atomically replaces the value of the atomic object with a non-atomic argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) |