Espaces de noms
Variantes
Affichages
Actions

std::io_errc

De cppreference.com
< cpp‎ | io

 
 
D'entrée / sortie de bibliothèque
I / O manipulateurs
C-style I / O
Tampons
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 (obsolète)
Cours d'eau
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstractions
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
Fichier E / 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
Chaîne 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
Tableau 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 (obsolète)
ostrstream (obsolète)
strstream (obsolète)
Types
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 catégorie d'erreur
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 d'aide
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>
Les fonctions d'assistance
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;
(depuis C++11)
La portée std::io_errc énumération définit les codes d'erreur générés par les flux d'E / S dans les objets d'exception std::ios_base::failure. Un seul code d'erreur (std::io_errc::stream) est nécessaire, même si la mise en œuvre peut définir des codes d'erreur supplémentaires. Parce que la spécialisation approprié de std :: is_error_code_enum est fourni, les valeurs de type std::io_errc sont implicitement convertible en 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.

Sommaire

[modifier] Constantes membres

Énumération 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

[modifier] Classes d'aide

prolonge le trait std::is_error_code_enum type pour identifier les codes d'erreur 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.

(classe générique)

[modifier] Fonctions annexes

construit un code d'erreur 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.

(fonction)
construit 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.

(fonction)

[modifier] Exemple

#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";
    }
}

Résultat :

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

[modifier] Voir aussi

(C++11)
détient un code d'erreur dépendant de la plate-forme
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]
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) [edit]
exception ruisseau
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.

(classe membre publique de std::ios_base) [edit]