[ostream.inserters]
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&));
basic_ostream& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
basic_ostream& operator<<(ios_base& (*pf)(ios_base&));
basic_ostream& operator<<(basic_streambuf<charT, traits>* sb);
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.
basic_ostream& operator<<(nullptr_t);