protected virtual member function


int underflow();
Get character
Returns the character at the current get pointer position (gptr), if one is available. Otherwise it returns EOF.

This virtual function is called by public member functions of streambuf such as sgetc to request a new character when there are no read positions available at the get pointer (gptr). Because stringbuf objects cannot make more read characters available, the function always returns EOF in these cases.



Return Value

If a character is available at the get pointer position (gptr), that character, converted a value of type int.
Otherwise, the function returns EOF.

Data races

Accesses the stringbuf object.
Concurrent access to the same object may cause data races.

Exception safety

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

See also