cpp/io/basic syncbuf/emit

Atomically transmits all pending output to the wrapped stream.

All calls transferring characters to the same wrapped stream buffer object appear to execute in a total order, where each  call synchronizes-with subsequent  calls in that total order, even if these calls are made through difference instances of std/std. In practice, this means that emit takes a lock uniquely associated with the wrapped stream object: for example, it could be held in a static hash map where the address of the wrapped stream is used as the key.

If a call had been made to since the last call to, then also flushes the wrapped stream by calling  on it.

Parameters
(none)

Return value
if all of the following is true:
 * there is a wrapped stream (the wrapped streambuf pointer is not null)
 * all characters from the temporary storage were successfully sent into the wrapped stream
 * the call to, if requested, also completed successfully.

Returns otherwise.