basic_streambuf::overflow
basic_streambuf::overflow
Consumes the pending characters of an output sequence.
virtual int_type overflow
(int_type c = traits::eof());
The pending sequence is defined as the concatenation of the
put pointer minus the
beginning pointer plus either the sequence of characters or an empty sequence, unless the beginning pointer is null in which case the pending sequence is an empty sequence.
This function is called by
sputc() and
sputn() when the buffer is not large enough to hold the output sequence.
Overriding this function requires that:
When overridden by a derived class how characters are consumed must be specified.
After the overflow either the
beginning pointer must be
null or the
beginning and
put pointer must both be set to the same
non-null value.
The function may fail if appending characters to an output stream fails or failure to set the previous requirement occurs.
The function returns
traits::eof() for failure or some unspecified result to indicate success.