C++ named requirements: UnformattedOutputFunction - cppreference.com (original) (raw)

[edit] Requirements

A UnformattedOutputFunction is a stream output function that performs the following:

  1. Constructs an object of type

basic_ostream::sentry

with automatic storage duration, which performs the following:

  1. Checks the status of the sentry by calling sentry::operator bool(), which is equivalent to

basic_ios::good

.

  1. In any event, whether terminating by exception or returning, the sentry's destructor is called before leaving this function.

[edit] Standard library

The following standard library functions are UnformattedOutputFunctions.

basic_ostream::tellp (except calls pubseekoff instead of output) basic_ostream::seekp (except calls pubseekoff or pubseekpos instead of output) (since C++11)

[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
LWG 63 C++98 the exception-handling policy was missing added
LWG 160 C++98 the process of determining whether the exception caughtis rethrown mentioned a non-existing function exception() corrected to exceptions()
LWG 165 C++98 the only virtual member allowed to becalled on rdbuf() was overflow() also allowedxsputn() and sync()