std::future::get
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. |
T get(); |
(1) | ( seul membre de )future modèle génériqueOriginal: member only of generic future 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) |
T& get(); |
(2) | ( seul membre de spécialisation de template )future<T&> Original: member only of future<T&> 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 get(); |
(3) | ( seul membre de spécialisation de template )future<void> Original: member only of future<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) |
La méthode
get
attend que le future
a un résultat valable et (en fonction du modèle utilisé), il récupère. Il appelle effectivement wait()
pour attendre le résultat .Original:
The
get
method waits until the future
has a valid result and (depending on which template is used) retrieves it. It effectively calls wait()
in order to wait for the result.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.
Le modèle générique et deux spécialisations modèles contiennent chacune une seule version de
get
. Les trois versions de get
ne diffèrent que par le type de retour .Original:
The generic template and two template specializations each contain a single version of
get
. The three versions of get
differ only in the return type.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.
valid()
== false après un appel à cette méthode .Original:
valid()
== false after a call to this method.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
(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] Retourne la valeur
1)La valeur stockée dans l'état partagé. Si elle satisfait aux exigences de
2) MoveAssignable
, la valeur est déplacé, sinon il est copié .Original:
The value stored in the shared state. If it satisfies the requirements of
MoveAssignable
, the value is moved, otherwise it is copied.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.
La référence à la valeur dans l'état partagé .
3) Original:
Reference to the value 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.
You can help to correct and verify the translation. Click here for instructions.
Rien .
Original:
Nothing.
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
Si une exception a été stocké à l'état partagé référencé par l'avenir (par exemple, via un appel à
std::promise::set_exception
) alors que exception sera levée .Original:
If an exception was stored in the shared state referenced by the future (e.g. via a call to
std::promise::set_exception
) then that exception will be thrown.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
vérifie si le future est un état partagé avec un promise Original: checks if the future has shared state with a promise 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) |