Espaços nominais
Variantes
Acções

std::io_errc

Da cppreference.com
< cpp‎ | io

 
 
De entrada / saída da biblioteca
I / O manipuladores
C estilo de 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(obsoleta)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstrações
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
Cordas 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 de 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(obsoleta)
ostrstream(obsoleta)
strstream(obsoleta)
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
Interface de categoria de erro
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
Classes auxiliares
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>
Funções auxiliares
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;
(a partir do C++ 11)
O std::io_errc enumeração escopo define os códigos de erro do I / O córregos em objetos de exceção std::ios_base::failure. Apenas um código de erro (std::io_errc::stream) é necessário, embora a implementação pode definir os códigos de erro adicionais. Porque a especialização adequada de std :: is_error_code_enum é fornecida, valores do tipo std::io_errc são implicitamente conversível para 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.

Índice

[editar] Constantes de membros

Enumeração 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] Classes auxiliares

estende a std::is_error_code_enum tipo traço de identificar os códigos de erro 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.

(modelo de classe)

[editar] Não-membros funções

constrói um código de erro 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.

(função)
constrói uma 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.

(função)

[editar] Exemplo

#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] Veja também

possui um código de erro depende da 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.

(classe) [edit]
possui um código de erro 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.

(classe) [edit]
exceção fluxo
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.

(of std::ios_base public class membro) [edit]