std::ios_base::iostate
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. |
| typedef /*implementation defined*/ iostate; |
||
| static constexpr iostate goodbit = 0; |
||
| static constexpr iostate badbit = /*implementation defined*/ static constexpr iostate failbit = /*implementation defined*/ |
||
Spécifie les indicateurs d'état des cours d'eau. C'est un
BitmaskType, les constantes suivantes sont définies : Original:
Specifies stream state flags. It is a
BitmaskType, the following constants are defined: 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.
| Constante
Original: Constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Explanation |
| goodbit | pas d'erreur
Original: no error The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| badbit | erreur de flux irrécupérables
Original: irrecoverable stream error The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| failbit | d'entrée / sortie de l'opération a échoué (erreur de formatage ou d'extraction)
Original: input/output operation failed (formatting or extraction error) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| eofbit | séquence d'entrée associé a atteint la fin de fichier
Original: associated input sequence has reached end-of-file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Sommaire |
[modifier] L'eofbit
Le eofbit est défini par les fonctions suivantes de la bibliothèque standard:.
Original:
The eofbit is set by the following standard library functions:
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.
- La fonction std::getline chaîne d'entrée si elle se termine en atteignant la fin du flux, plutôt que d'atteindre le caractère spécifié fin .Original:The string input function std::getline if it completes by reaching the end of the stream, as opposed to reaching the specified terminating character.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Les surcharges d'entrée numériques de basic_istream::operator>> si la fin du flux a été rencontrée lors de la lecture du caractère suivant, à l'étape 2 du traitement num_get::get. Selon l'état de l'analyse,
failbitpeut ou ne peut pas être réglé en même temps: par exemple, int n; istringstream buf("1"); buf >> n; ensembleseofbit, mais pasfailbit: le 1 entier a pu être analysé et stocké dansn. D'autre part, bool b; istringstream buf("tr"); buf >> boolalpha >> b; définit à la foiseofbitetfailbit: il n'y avait pas assez de caractères pour compléter l'analyse du true booléen .Original:The numeric input overloads of basic_istream::operator>> if the end of the stream was encountered while reading the next character, on Stage 2 of num_get::get processing. Depending on the parsing state,failbitmay or may not be set at the same time: for example, int n; istringstream buf("1"); buf >> n; setseofbit, but notfailbit: the integer 1 was successfully parsed and stored inn. On the other hand, bool b; istringstream buf("tr"); buf >> boolalpha >> b; sets botheofbitandfailbit: there was not enough characters to complete the parsing of the boolean true.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Les surcharges d'extraction de caractères de operator>>std::basic_istream, si la fin du flux est atteinte avant que la limite (le cas échéant) sur le nombre de caractères à extraire .Original:The character extraction overloads of operator>>std::basic_istream, if the end of the stream is reached before the limit (if any) on the number of characters to be extracted.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Le std::get_time I / O manipulateur et l'une des fonctions d'analyse de std::time_get: time_get::get, time_get::get_time, time_get::get_date, etc, si la fin du flux est atteinte avant le dernier caractère nécessaire pour analyser le attendue valeur date / heure a été traité .Original:The std::get_time I/O manipulator and any of the std::time_get parsing functions: time_get::get, time_get::get_time, time_get::get_date, etc., if the end of the stream is reached before the last character needed to parse the expected date/time value was processed.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - La std::get_money E / S et la fonction de manipulateur money_get::get, si la fin du flux est atteinte avant que le dernier caractère nécessaire d'analyser la valeur monétaire attendue a été générée .Original:The std::get_money I/O manipulator and money_get::get function, if the end of the stream is reached before the last character needed to parse the expected monetary value was processed.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Le constructeur basic_istream::sentry, exécuté au début de chaque fonction de saisie formatée: si le bit est à l'arrêt
skipws(par exemple par l'émission std::noskipws), sentinelle lit et supprime les principaux personnages blancs. Si la fin du flux d'entrée est atteinte lors de cette opération, à la foiseofbitetfailbitsont fixés, et aucune entrée a lieu .Original:The basic_istream::sentry constructor, executed at the beginning of every formatted input function: unless theskipwsbit is unset (e.g. by issuing std::noskipws), sentry reads and discards the leading whitespace characters. If the end of the input stream is reached during this operation, botheofbitandfailbitare set, and no input takes place.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Le std::ws manipulateur d'E / S, si elle atteint la fin du flux tout en consommant des espaces (mais, contrairement à la sentinelle de saisie formatée, elle ne définit pas
failbitdans ce cas)Original:The I/O manipulator std::ws, if it reaches the end of the stream while consuming whitespace (but, unlike the formatted input sentry, it does not setfailbitin this case)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Les fonctions d'entrée non mis en forme basic_istream::read, basic_istream::get, et basic_istream::getline, lorsqu'il atteint la fin du flux .Original:The unformatted input functions basic_istream::read, basic_istream::get, and basic_istream::getline, when reaching the end of the stream.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - basic_istream::ignore la fonction de mise hors d'entrée, lorsqu'il atteint la fin du flux de caractères avant d'atteindre le séparateur spécifié .Original:The discard input function basic_istream::ignore, when reaching the end of the stream before reaching the specified delimiter character.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Le basic_istream::readsome entrée immédiate fonction, si basic_streambuf::in_avail retourne -1Original:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Les fonctions suivantes effacer
eofbit comme un effet secondaire:Original:
The following functions clear
eofbit as a side-effect: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] L'failbit
Le failbit est défini par les fonctions suivantes de la bibliothèque standard:
Original:
The failbit is set by the following standard library functions:
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.
| This section is incomplete |
[modifier] L'BadBit
Le BadBit est défini par les fonctions suivantes de la bibliothèque standard:
Original:
The badbit is set by the following standard library functions:
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.
| This section is incomplete Reason: move from ios_base::bad and expand |
[modifier] Exemple
| This section is incomplete Reason: no example |
[modifier] Voir aussi
| ios_base::iostate flags | basic_ios accessors | |||||||
| eofbit | failbit | badbit | good() | fail() | bad() | eof() | operator bool() | operator!() |
| false | false | false | true | false | false | false | true | false |
| false | false | true | false | true | true | false | false | true |
| false | true | false | false | true | false | false | false | true |
| false | true | true | false | true | true | false | false | true |
| true | false | false | false | false | false | true | true | false |
| true | false | true | false | true | true | true | false | true |
| true | true | false | false | true | false | true | false | true |
| true | true | true | false | true | true | true | false | true |