protected virtual member function
<streambuf> <iostream>


int uflow();
Get character on underflow and advance position
Virtual function called by other member functions to get the current character in the controlled input sequence and then advance the position indicator to the next character.

It is called by public member functions such as sbumpc to request a new character when there are no read positions available at the get pointer (gptr).

Its default behavior in streambuf is to call member underflow, returning the same value but advancing the position indicator to point to the next character in case of success. Derived classes can override this behavior if needed to implement a different behavior.

Its behavior in streambuf is the same as if implemented as:
int uflow() {
  if ( underflow() == EOF ) return EOF;
  return gptr()[-1];



Return Value

If the call to underflow returns EOF, this function returns the same.
Otherwise, it returns the character at the current position of the controlled input sequence, as a value of type int.
Member type int_type is an integral type able to represent any character value or the special end-of-file value.

Data races

Modifies the stream buffer object.
Concurrent access to the same stream buffer object may introduce data races.

Exception safety

Basic guarantee: if an exception is thrown, the stream buffer is in a valid state.

See also