basic_filebuf::overflow
basic_filebuf::overflow
virtual int_type overflow(int_type c = T::eof());
If c != T::
eof
()
, the protected virtual member function endeavors to insert the element T::
to_char_type
(c)
into the output buffer. It can do so in various ways:
- If a write position is available, it can store the element into the write position and increment the next pointer for the output buffer.
- It can make a write position available by allocating new or additional storage for the output buffer.
- It can convert any pending output in the output buffer, followed by
c
, by using the file conversion facetfac
to callfac.
out
as needed. Each elementx
of type char thus produced is written to the associated stream designated by the file pointerfp
as if by successive calls of the formfputc``(x, fp)
. If any conversion or write fails, the function does not succeed.
If the function cannot succeed, it returns T::eof()
. Otherwise, it returns T::
not_eof
(c)
.