std::make_error_code(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. |
Defined in header <ios>
|
||
std::error_code make_error_code( std::io_errc e ); |
(desde C++11) | |
Construye un objeto std::error_code partir de un valor de tipo std::io_errc como por return std::error_code(static_cast<int>(e), std::iostream_category()). Esta función es llamada por el constructor de std::error_code cuando se les da un argumento std::io_errc .
Original:
Constructs an std::error_code object from a value of type std::io_errc as if by return std::error_code(static_cast<int>(e), std::iostream_category()). This function is called by the constructor of std::error_code when given an std::io_errc argument.
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.
Contenido |
[editar] Parámetros
e | - | número de código de error
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. |
[editar] Valor de retorno
Un valor de std::error_code tipo que tiene el número de código de error de
e
asociado con la categoría de error "iostream" .Original:
A value of type std::error_code 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.
[editar] Ejemplo
#include <iostream> #include <system_error> int main() { std::error_code ec = std::make_error_code(std::io_errc::stream); std::cout << "Error code from io_errc::stream has category " << ec.category().name() << '\n'; }
Output:
Error code from io_errc::stream has category iostream
[editar] Ver también
(C++11) |
crea un código de error a partir de una error_category Original: creates an error code from an error_category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) |
(C++11) |
tiene un código de error dependiente de la plataforma Original: holds a platform-dependent error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) |
(C++11) |
los códigos IO secuencia de error 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) |