30 Input/output library [input.output]

30.5 Iostreams base classes [iostreams.base]

30.5.6 ios_­base manipulators [std.ios.manip]

30.5.6.1 fmtflags manipulators [fmtflags.manip]

ios_base& boolalpha(ios_base& str);

Effects: Calls str.setf(ios_­base​::​boolalpha).

Returns: str.

ios_base& noboolalpha(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​boolalpha).

Returns: str.

ios_base& showbase(ios_base& str);

Effects: Calls str.setf(ios_­base​::​showbase).

Returns: str.

ios_base& noshowbase(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​showbase).

Returns: str.

ios_base& showpoint(ios_base& str);

Effects: Calls str.setf(ios_­base​::​showpoint).

Returns: str.

ios_base& noshowpoint(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​showpoint).

Returns: str.

ios_base& showpos(ios_base& str);

Effects: Calls str.setf(ios_­base​::​showpos).

Returns: str.

ios_base& noshowpos(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​showpos).

Returns: str.

ios_base& skipws(ios_base& str);

Effects: Calls str.setf(ios_­base​::​skipws).

Returns: str.

ios_base& noskipws(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​skipws).

Returns: str.

ios_base& uppercase(ios_base& str);

Effects: Calls str.setf(ios_­base​::​uppercase).

Returns: str.

ios_base& nouppercase(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​uppercase).

Returns: str.

ios_base& unitbuf(ios_base& str);

Effects: Calls str.setf(ios_­base​::​unitbuf).

Returns: str.

ios_base& nounitbuf(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​unitbuf).

Returns: str.

30.5.6.2 adjustfield manipulators [adjustfield.manip]

ios_base& internal(ios_base& str);

Effects: Calls str.setf(ios_­base​::​internal, ios_­base​::​adjustfield).

Returns: str.

ios_base& left(ios_base& str);

Effects: Calls str.setf(ios_­base​::​left, ios_­base​::​adjustfield).

Returns: str.

ios_base& right(ios_base& str);

Effects: Calls str.setf(ios_­base​::​right, ios_­base​::​adjustfield).

Returns: str.

30.5.6.3 basefield manipulators [basefield.manip]

ios_base& dec(ios_base& str);

Effects: Calls str.setf(ios_­base​::​dec, ios_­base​::​basefield).

Returns: str298.

ios_base& hex(ios_base& str);

Effects: Calls str.setf(ios_­base​::​hex, ios_­base​::​basefield).

Returns: str.

ios_base& oct(ios_base& str);

Effects: Calls str.setf(ios_­base​::​oct, ios_­base​::​basefield).

Returns: str.

The function signature dec(ios_­base&) can be called by the function signature basic_­ostream& stream​::​operator<<(ios_­base& (*)(ios_­base&)) to permit expressions of the form cout << dec to change the format flags stored in cout.

30.5.6.4 floatfield manipulators [floatfield.manip]

ios_base& fixed(ios_base& str);

Effects: Calls str.setf(ios_­base​::​fixed, ios_­base​::​floatfield).

Returns: str.

ios_base& scientific(ios_base& str);

Effects: Calls str.setf(ios_­base​::​scientific, ios_­base​::​floatfield).

Returns: str.

ios_base& hexfloat(ios_base& str);

Effects: Calls str.setf(ios_­base​::​fixed | ios_­base​::​scientific, ios_­base​::​floatfield).

Returns: str.

[Note: The more obvious use of ios_­base​::​hex to specify hexadecimal floating-point format would change the meaning of existing well defined programs. C++ 2003 gives no meaning to the combination of fixed and scientific.end note]

ios_base& defaultfloat(ios_base& str);

Effects: Calls str.unsetf(ios_­base​::​floatfield).

Returns: str.

30.5.6.5 Error reporting [error.reporting]

error_code make_error_code(io_errc e) noexcept;

Returns: error_­code(static_­cast<int>(e), iostream_­category()).

error_condition make_error_condition(io_errc e) noexcept;

Returns: error_­condition(static_­cast<int>(e), iostream_­category()).

const error_category& iostream_category() noexcept;

Returns: A reference to an object of a type derived from class error_­category.

The object's default_­error_­condition and equivalent virtual functions shall behave as specified for the class error_­category. The object's name virtual function shall return a pointer to the string "iostream".