std::atomic::load
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> T load( memory_order = std::memory_order_seq_cst ) const; |
(depuis C++11) | |
T load( memory_order = std::memory_order_seq_cst ) const volatile; |
(depuis C++11) | |
Atomiquement charges et retourne la valeur courante de la variable atomique. La mémoire est affectée en fonction de la valeur de
memory_order .Original:
Atomically loads and returns the current value of the atomic variable. 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_consume, std::memory_order_acquire 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_consume, std::memory_order_acquire 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
| 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
La valeur actuelle de la variable atomique .
Original:
The current value of 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.
You can help to correct and verify the translation. Click here for instructions.
Exceptions
Voir aussi
charge une valeur d'un objet atomique Original: loads a value from 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) |
obtient atomiquement la valeur stockée dans un objet atomique Original: atomically obtains the value stored in 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 générique) |