explicit failure(const string& msg, const error_code& ec = io_errc::stream);
explicit failure(const char* msg, const error_code& ec = io_errc::stream);
using fmtflags = T1;
| Element | Effect(s) if set | |
| boolalpha | insert and extract bool type in alphabetic format | |
| dec | converts integer input or generates integer output in decimal base | |
| fixed | generate floating-point output in fixed-point notation | |
| hex | converts integer input or generates integer output in hexadecimal base | |
| internal | adds fill characters at a designated internal point in certain generated output,
 or identical to right if no such point is designated | |
| left | adds fill characters on the right (final positions) of certain generated output | |
| oct | converts integer input or generates integer output in octal base | |
| right | adds fill characters on the left (initial positions) of certain generated output | |
| scientific | generates floating-point output in scientific notation | |
| showbase | generates a prefix indicating the numeric base of generated integer output | |
| showpoint | generates a decimal-point character unconditionally in generated floating-point output | |
| showpos | generates a + sign in non-negative generated numeric output | |
| skipws | skips leading whitespace before certain input operations | |
| unitbuf | flushes output after each output operation | |
| uppercase | replaces certain lowercase letters with their uppercase equivalents in generated output | 
using iostate = T2;
| Element | Effect(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. | 
using openmode = T3;
| Element | Effect(s) if set | |
| app | seek to end before each write | |
| ate | open and seek to end immediately after opening | |
| binary | perform input and output in binary mode (as opposed to text mode) | |
| in | open for input | |
| noreplace | open in exclusive mode | |
| out | open for output | |
| trunc | truncate an existing stream when opening | 
using seekdir = T4;
Init();
~Init();
fmtflags flags() const;
fmtflags flags(fmtflags fmtfl);
fmtflags setf(fmtflags fmtfl);
fmtflags setf(fmtflags fmtfl, fmtflags mask);
void unsetf(fmtflags mask);
streamsize precision() const;
streamsize precision(streamsize prec);
streamsize width() const;
streamsize width(streamsize wide);
locale imbue(const locale& loc);
locale getloc() const;
static bool sync_with_stdio(bool sync = true);
static int xalloc();
long& iword(int idx);
void*& pword(int idx);
void register_callback(event_callback fn, int idx);
ios_base();
~ios_base();
| Expression | Return type | Operational | Assertion/note | |
| semantics | pre-/post-condition | |||
| P(o) | P | converts from offset | Effects: Value-initializes the state object. | |
| P p(o); P p = o; | ||||
| P() | P | P(0) | ||
| P p; | P p(0); | |||
| O(p) | streamoff | converts to offset | P(O(p)) == p | |
| p == q | bool | Remarks: For any two values o and o2,
   if p is obtained
   from o converted to P or
   from a copy of such P value and
   if q is obtained
   from o2 converted to P or
   from a copy of such P value,
   then p == q is true
   only if o == o2 is true. | ||
| p != q | bool | !(p == q) | ||
| p + o | P | + offset | Remarks: With ql = p + o;, then: ql - o == p | |
| pl += o | P& | += offset | Remarks: With ql = pl; before the +=, then:
   pl - o == ql | |
| p - o | P | - offset | Remarks: With ql = p - o;, then: ql + o == p | |
| pl -= o | P& | -= offset | Remarks: With ql = pl; before the -=, then:
    pl + o == ql | |
| o + p | convertible to P | p + o | P(o + p) == p + o | |
| p - q | streamoff | distance | p == q + (p - q) | 
explicit basic_ios(basic_streambuf<charT, traits>* sb);
basic_ios();
~basic_ios();
void init(basic_streambuf<charT, traits>* sb);
| Element | Value | |
| rdbuf() | sb | |
| tie() | 0 | |
| rdstate() | ||
| exceptions() | goodbit | |
| flags() | skipws | dec | |
| width() | 0 | |
| precision() | 6 | |
| fill() | widen(' ') | |
| getloc() | a copy of the value returned by locale() | |
| iarray | a null pointer | |
| parray | a null pointer | 
basic_ostream<charT, traits>* tie() const;
basic_ostream<charT, traits>* tie(basic_ostream<charT, traits>* tiestr);
basic_streambuf<charT, traits>* rdbuf() const;
basic_streambuf<charT, traits>* rdbuf(basic_streambuf<charT, traits>* sb);
locale imbue(const locale& loc);
char narrow(char_type c, char dfault) const;
char_type widen(char c) const;
char_type fill() const;
char_type fill(char_type fillch);
basic_ios& copyfmt(const basic_ios& rhs);
void move(basic_ios& rhs);
void move(basic_ios&& rhs);
void swap(basic_ios& rhs) noexcept;
void set_rdbuf(basic_streambuf<charT, traits>* sb);
explicit operator bool() const;
bool operator!() const;
iostate rdstate() const;
void clear(iostate state = goodbit);
void setstate(iostate state);
bool good() const;
bool eof() const;
bool fail() const;
bool bad() const;
iostate exceptions() const;
void exceptions(iostate except);
ios_base& boolalpha(ios_base& str);
ios_base& noboolalpha(ios_base& str);
ios_base& showbase(ios_base& str);
ios_base& noshowbase(ios_base& str);
ios_base& showpoint(ios_base& str);
ios_base& noshowpoint(ios_base& str);
ios_base& showpos(ios_base& str);
ios_base& noshowpos(ios_base& str);
ios_base& skipws(ios_base& str);
ios_base& noskipws(ios_base& str);
ios_base& uppercase(ios_base& str);
ios_base& nouppercase(ios_base& str);
ios_base& unitbuf(ios_base& str);
ios_base& nounitbuf(ios_base& str);
ios_base& internal(ios_base& str);
ios_base& left(ios_base& str);
ios_base& right(ios_base& str);
ios_base& dec(ios_base& str);
ios_base& hex(ios_base& str);
ios_base& oct(ios_base& str);
ios_base& fixed(ios_base& str);
ios_base& scientific(ios_base& str);
ios_base& hexfloat(ios_base& str);
ios_base& defaultfloat(ios_base& str);
error_code make_error_code(io_errc e) noexcept;
error_condition make_error_condition(io_errc e) noexcept;
const error_category& iostream_category() noexcept;