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 the function cannot succeed, it returns T::eof(). Otherwise, it returns T::not_eof(c).