27 Input/output library [input.output]

27.5 Iostreams base classes [iostreams.base]

27.5.3 Class ios_base [ios.base]

27.5.3.1 Types [ios.types]

27.5.3.1.3 Type ios_base::iostate [ios::iostate]

typedef T2 iostate;

The type iostate is a bitmask type ([bitmask.types]) that contains the elements indicated in Table [tab:iostreams.iostate.effects].

Table 124iostate effects
ElementEffect(s) if set
badbit indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file);
eofbit indicates that an input operation reached the end of an input sequence;
failbit indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.

Type iostate also defines the constant:

  • goodbit, the value zero.