protected virtual member function
<streambuf> <iostream>


int_type 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 basic_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 basic_streambuf is the same as if implemented as:
int_type uflow() {
  if ( underflow() == traits_type::eof() ) return traits_type::eof();
  return traits_type::to_int_type(gptr()[-1]);



Return Value

If the call to underflow returns the end-of-file value (traits_type::eof()), this function returns the same.
Otherwise, it returns the character at the current position of the controlled input sequence, converted to a value of type int_type using member traits_type::to_int_type.
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