std::make_error_condition(std::io_errc)
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 <ios>
|
||
std::error_condition make_error_condition( std::io_errc e ); |
(depuis C++11) | |
Construit un objet à partir d'une valeur std::error_condition de std::io_errc de type comme par return std::error_condition(static_cast<int>(e), std::iostream_category()) .
Original:
Constructs an std::error_condition object from a value of type std::io_errc as if by return std::error_condition(static_cast<int>(e), std::iostream_category()).
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
e | - | numéro de code d'erreur
Original: error code number 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
Une valeur de std::error_condition type qui contient le numéro de code d'erreur à partir de
e
associée à la catégorie d'erreurs "iostream" .Original:
A value of type std::error_condition that holds the error code number from
e
associated with the error category "iostream".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
#include <iostream> #include <system_error> int main() { std::error_condition ec = std::make_error_condition(std::io_errc::stream); std::cout << "error condition for io_errc::stream has value " << ec.value() << "\nand message \"" << ec.message() << "\"\n"; }
Résultat :
error condition for io_errc::stream has value 1 and message "unspecified iostream_category error"
[modifier] Voir aussi
(C++11) |
crée un objet condition d'erreur de error_category spécifié Original: creates an error condition object of specified error_category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
(C++11) |
détient un code d'erreur portable Original: holds a portable error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe) |
(C++11) |
les codes d'erreur IO cours d'eau Original: the IO stream error codes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (enum) |