31 Input/output library [input.output]

31.7 Formatting and manipulators [iostream.format]

31.7.6 Output streams [output.streams]

31.7.6.3 Formatted output functions [ostream.formatted]

31.7.6.3.3 basic_ostream​::​operator<< [ostream.inserters]

basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&));
Effects: None.
Does not behave as a formatted output function (as described in [ostream.formatted.reqmts]).
Returns: pf(*this).292
basic_ostream& 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.293
basic_ostream& 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& operator<<(basic_streambuf<charT, traits>* sb);
Effects: Behaves as an unformatted output function ([ostream.unformatted]).
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& operator<<(nullptr_t);
Effects: Equivalent to: return *this << s; where s is an implementation-defined NTCTS.
292)292)
See, for example, the function signature endl(basic_ostream&) ([ostream.manip]).
293)293)
See, for example, the function signature dec(ios_base&) ([basefield.manip]).