basic_stringbuf::underflow

virtual int_type underflow();

The protected virtual member function endeavors to extract the current element c from the input buffer, then advance the current stream position, and return the element as T::to_int_type(c). It can do so in only one way: If a read position is available, it takes c as the element stored in the read position and advances the next pointer for the input buffer.

If the function cannot succeed, it returns T::eof(). Otherwise, it returns the current element in the input stream, converted as described above.