std::promise::set_value
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. |
void set_value(const R& value ); | (1) | ( seul membre de )promise modèle génériqueOriginal: member only of generic promise templateThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value( R&& value ); | (2) | ( seul membre de )promise modèle génériqueOriginal: member only of generic promise templateThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value( R& value ); | (3) | ( seul membre de spécialisation de template )promise<R&> Original: member only of promise<R&> template specializationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value() | (4) | ( seul membre de spécialisation de template )promise<void> Original: member only of promise<void> template specializationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
Stocke le
value
dans l'état partagé et fait l'état prêt . Original:
Stores the
value
into the shared state and makes the state ready. 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.
L'opération est atomique, c'est à dire qu'il se comporte comme si elles acquièrent un seul mutex associé à l'objet promesse en mettant à jour l'objet promesse .
Original:
The operation is atomic, i.e. it behaves as though they acquire a single mutex associated with the promise object while updating the promise object.
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.
Une exception est levée si aucun état partagé ou l'état partagé stocke déjà une valeur ou d'exception .
Original:
An exception is thrown if there is no shared state or the shared state already stores a value or exception.
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.
Sommaire |
[modifier]Paramètres
value | - | valeur à stocker dans l'état partagé Original: value to store in the shared state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier]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.
[modifier]Exceptions
std::future_error dans les conditions suivantes:
Original:
std::future_error on the following conditions:
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.
- *this n'a pas d'état partagé. La catégorie d'erreur est mis à no_state .Original:*this has no shared state. The error category is set to no_state.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- L'état partagé stocke déjà une valeur ou d'exception. La catégorie d'erreur est mis à promise_already_satisfied .Original:The shared state already stores a value or exception. The error category is set to promise_already_satisfied.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
En outre:
Original:
Additionally:
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.
1-2)
Toute exception levée par le constructeur de copie de
value
Original:
Any exception thrown by the copy constructor of
value
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.
3)
Toute exception levée par le constructeur mouvement de
value
Original:
Any exception thrown by the move constructor of
value
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.
[modifier]Exemple
This section is incomplete Reason: no example |
[modifier]Voir aussi
établit le résultat pour indiquer une exception Original: sets the result to indicate an exception 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) |