Espacios de nombres
Variantes
Acciones

std::io_errc

De cppreference.com
< cpp‎ | io

 
 
Entrada / salida de la biblioteca
I / O manipuladores
C-estilo I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(obsoleto)
Arroyos
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstracciones
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Cadena de I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Matriz I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(obsoleto)
ostrstream(obsoleto)
strstream(obsoleto)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error interfaz categoría
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::io_errc
Clases de ayuda
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is_error_code_enum<std::io_errc>
Las funciones de ayuda
Original:
Helper functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
make_error_code(std::io_errc)
make_error_condition(std::io_errc)
 
Defined in header <ios>
enum class io_errc;
(desde C++11)
La enumeración std::io_errc ámbito define los códigos de error mostrados por los arroyos de E / S de los objetos de excepción std::ios_base::failure. Sólo un código de error (std::io_errc::stream) es necesaria, aunque la aplicación puede definir códigos de error adicionales. Debido a la especialización adecuada de std :: is_error_code_enum se proporciona valores de tipo std::io_errc son implícitamente convertible a std::error_code .
Original:
The scoped enumeration std::io_errc defines the error codes reported by I/O streams in std::ios_base::failure exception objects. Only one error code (std::io_errc::stream) is required, although the implementation may define additional error codes. Because the appropriate specialization of std::is_error_code_enum is provided, values of type std::io_errc are implicitly convertible to std::error_code.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Constantes de miembros

Enumeración constante
Original:
Enumeration constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Value
stream 1

[editar] Clases de ayuda

extiende el std::is_error_code_enum rasgo tipo para identificar los códigos de error iostream
Original:
extends the type trait std::is_error_code_enum to identify iostream error codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla)

[editar] Terceros funciones

construye un código de error iostream
Original:
constructs an iostream error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)
construye un error_condition iostream
Original:
constructs an iostream error_condition
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)

[editar] Ejemplo

#include <iostream>
#include <fstream>
int main()
{
    std::ifstream f("doesn't exist");
    try {
        f.exceptions(f.failbit);
    } catch (const std::ios_base::failure& e) {
        std::cout << "Caught an ios_base::failure.\n";
        if(e.code() == std::io_errc::stream)
            std::cout << "The error code is std::io_errc::stream\n";
    }
}

Output:

Caught an ios_base::failure.
The error code is std::io_errc::stream

[editar] Ver también

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) [edit]
tiene un código de error portátil
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.

(clase) [edit]
corriente excepción
Original:
stream exception
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::ios_base clase) [edit]