Consumes the pending characters of an output sequence.
virtual int_type overflow (int_type c = 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:
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 traits::not_eof(c) to indicate success.