29 Input/output library [input.output]

29.7 Formatting and manipulators [iostream.format]

29.7.5 Output streams [output.streams]

29.7.5.2 Formatted output functions [ostream.formatted]

29.7.5.2.3 basic_­ostream​::​operator<< [ostream.inserters]

basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& (*pf)(basic_ostream<charT, traits>&));
Effects: None.
Does not behave as a formatted output function (as described in [ostream.formatted.reqmts]).
Returns: pf(*this).317
basic_ostream<charT, traits>& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
Effects: Calls pf(*this).
This inserter does not behave as a formatted output function (as described in [ostream.formatted.reqmts]).
Returns: *this.318
basic_ostream<charT, traits>& operator<<(ios_base& (*pf)(ios_base&));
Effects: Calls pf(*this).
This inserter does not behave as a formatted output function (as described in [ostream.formatted.reqmts]).
Returns: *this.
basic_ostream<charT, traits>& operator<<(basic_streambuf<charT, traits>* sb);
Effects: Behaves as an unformatted output function.
After the sentry object is constructed, if sb is null calls setstate(badbit) (which may throw ios_­base​::​failure).
Gets characters from sb and inserts them in *this.
Characters are read from sb and inserted until any of the following occurs:
  • end-of-file occurs on the input sequence;
  • inserting in the output sequence fails (in which case the character to be inserted is not extracted);
  • an exception occurs while getting a character from sb.
If the function inserts no characters, it calls setstate(failbit) (which may throw ios_­base​::​​failure ([iostate.flags])).
If an exception was thrown while extracting a character, the function sets failbit in the error state, and if failbit is set in exceptions() the caught exception is rethrown.
Returns: *this.
basic_ostream<charT, traits>& operator<<(nullptr_t);
Effects: Equivalent to:
return *this << s;
where s is an implementation-defined NTCTS.
See, for example, the function signature endl(basic_­ostream&) ([ostream.manip]).
⮥
See, for example, the function signature dec(ios_­base&) ([basefield.manip]).
⮥