名前空間
変種
操作

std::ios_base::iostate

提供: cppreference.com
< cpp‎ | io‎ | ios base

 
 
入力/出力ライブラリ
I / Oのマニピュレータ
CスタイルのI / O
バッファ
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(廃止予定)
ストリーム
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象化
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
ファイル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
文字列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
アレイの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(廃止予定)
ostrstream(廃止予定)
strstream(廃止予定)
タイプ
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
エラーカテゴリインターフェース
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::ios_base
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::ios_base
ios_base::~ios_base
書式
Original:
Formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::flags
ios_base::setf
ios_base::unsetf
ios_base::precision
ios_base::width
ロケール
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::imbue
ios_base::getloc
内部拡張可能配列
Original:
Internal extensible array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::xalloc
ios_base::iword
ios_base::pword
その他
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::register_callback
ios_base::sync_with_stdio
メンバークラス
Original:
Member classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::failure
ios_base::Init
メンバータイプ
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base::openmode
ios_base::fmtflags
ios_base::iostate
ios_base::seekdir
ios_base::event
ios_base::event_callback
 
typedef /*implementation defined*/ iostate;
static constexpr iostate goodbit = 0;
static constexpr iostate badbit = /*implementation defined*/

static constexpr iostate failbit = /*implementation defined*/

static constexpr iostate eofbit = /*implementation defined*/
ストリームの状態フラグを指定します。それはBitmaskTypeで、以下の定数が定義されています
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.
定数
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
エラーなし
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
回復不能なストリームエラー
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
入力/出力操作(書式設定や抽出誤差)に失敗しました
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
関連する入力シーケンスはファイルの終わりに達している
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.

目次

[編集] eofbit

eofbitは、次の標準ライブラリ関数によって設定されます
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.
  • 文字列入力機能std::getlineそれは指定された終了文字に到達するとは対照的に、ストリームの最後に到達することによって完了した場合は.
    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.
  • basic_istream::operator>>処理のステージ2で、次の文字を読みながら、ストリームの終わりに達した場合はnum_get::getの数値入力オーバーロード。解析状態に応じて、failbitは五月または同時に設定できないことがあります:例えば、int n; istringstream buf("1"); buf >> n;セットeofbitなく、failbit:整数1は正常に解析され、nに格納されていました。一方、bool b; istringstream buf("tr"); buf >> boolalpha >> b;は両方eofbitfailbitを設定します。booleantrueの解析を完了するのに十分な文字がありませんでした.
    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, failbit may or may not be set at the same time: for example, int n; istringstream buf("1"); buf >> n; sets eofbit, but not failbit: the integer 1 was successfully parsed and stored in n. On the other hand, bool b; istringstream buf("tr"); buf >> boolalpha >> b; sets both eofbit and failbit: 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.
  • ストリームの終わりに抽出する文字数の制限(もしあれば)の前に到達した場合operator>>std::basic_istreamの文字抽出オーバーロード、.
    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.
  • I / Oは、マニピュレータとstd::get_time解析関数のいずれstd::time_gettime_get::gettime_get::get_timetime_get::get_dateなど、最後の文字は値が処理された期待通りの日付/時刻を解析するために必要とされる前にストリームの終わりに達した場合は.
    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.
  • std::get_moneyI / Oのマニピュレータとmoney_get::get機能、期待される金銭的価値を解析するために必要な最後の文字が処理される前にストリームの終わりに達した場合は.
    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.
  • すべての書式付き入力関数の先頭で実行basic_istream::sentryコンストラクタは、:skipwsビットが設定されていない限り(std::noskipwsを発行するなどして)、歩哨の読み取りと先行する空白文字を破棄します。入力ストリームの終わりにこの操作中に到達した場合、eofbitfailbit設定して、かつ入力が行われていない両方の.
    Original:
    The basic_istream::sentry constructor, executed at the beginning of every formatted input function: unless the skipws bit 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, both eofbit and failbit are 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.
  • I / Oのマニピュレータstd::ws、それはストリームの終わりに達した場合、消費電力は空白文字(ただし、書式設定された入力歩哨とは違って、それが設定されていませんfailbitこのケースでは)
    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 set failbit in this case)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • フォーマットされていない入力機能basic_istream::readbasic_istream::get、そしてbasic_istream::getline、ストリームの終わりに達した.
    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、.
    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.
  • 即時入力機能basic_istream::readsome、もしbasic_streambuf::in_avail戻り-1
    Original:
    The immediate input function basic_istream::readsome, if basic_streambuf::in_avail returns -1
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
副作用として、以下の機能を明確eofbit
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.

[編集] failbitが

failbitが、次の標準ライブラリ関数によって設定されます
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.

[編集] badbitを

badbitを次の標準ライブラリ関数によって設定されます
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.

[編集]

[編集] も参照してください

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