basic_filebuf::pbackfail

virtual int_type pbackfail(int_type c =
    traits_type::eof());

The protected virtual member function endeavors to put back an element into the input buffer, then make it the current element (pointed to by the next pointer). If c == traits_type::eof(), the element to push back is effectively the one already in the stream before the current element. Otherwise, that element is replaced by x = traits_type::to_char_type(c). The function can put back an element in various ways:

If the function cannot succeed, it returns traits_type::eof(). Otherwise, it returns traits_type::not_eof(c).