protected virtual member function
<streambuf> <iostream>
Get character on underflow
Virtual function called by other member functions to get the current character in the controlled input sequence without changing the current position.
It is called by public member functions such as sgetc 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 always return traits_type::eof()
(indicating failure), but derived classes can override this behavior to modify the gptr and egptr internal pointers in such a way that more characters from the input sequence may be made accessible through the buffer (if these are available). Both basic_filebuf and basic_stringbuf override this virtual member function.
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.