std::promise
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. |
Déclaré dans l'en-tête <future> | ||
template<class T >class promise; | (1) | (depuis C++11) |
template<class T >class promise<T&>; | (2) | (depuis C++11) |
template<> class promise<void>; | (3) | (depuis C++11) |
Le modèle de classe
std::promise
propose également un centre de stocker une valeur qui est ensuite acquise de manière asynchrone via un objet std::future, que le std::promise
peut fournir .Original:
The class template
std::promise
provides a facility to store a value that is later acquired asynchronously via a std::future object, that the std::promise
can supply.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 section is incomplete |
[modifier]Fonctions membres
construit l'objet promesse Original: constructs 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. (fonction membre publique) | |
Détruit l'objet promesse Original: destructs 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. (fonction membre publique) | |
attribue l'état partagé Original: assigns 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. (fonction membre publique) | |
swaps de deux objets promesse Original: swaps two promise objects 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) | |
Original: Getting the result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
renvoie une future associé au résultat promis Original: returns a future associated with the promised result 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) | |
Original: Setting the result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
définit le résultat à la valeur spécifique Original: sets the result to specific value 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) | |
définit le résultat à la valeur spécifique, tout en offrant la seule notification à la sortie du fil Original: sets the result to specific value while delivering the notification only at thread exit 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) | |
é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) | |
définit le résultat d'indiquer une exception, tout en offrant la seule notification à la sortie du fil Original: sets the result to indicate an exception while delivering the notification only at thread exit 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) |
[modifier]Fonctions annexes
(C++11) | l'algorithme spécialisé std::swap Original: specializes the std::swap algorithm 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) |
[modifier]Classes d'aide
se spécialise le trait de type std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique spécialisée) |