protected virtual member function
<sstream>
std::basic_stringbuf::underflow
Get character
traits_type::eof()).This virtual function is called by public member functions of basic_streambuf such as sgetc to request a new character when there are no read positions available at the get pointer (gptr). Because basic_stringbuf objects cannot make more read characters available, the function always returns the end-of-file value in these cases.
Parameters
noneReturn Value
If a character is available at the get pointer position (gptr), that character, converted to a value of type int_type using traits_type::to_int_type.Otherwise, the function returns the end-of-file value (
traits_type::eof()).Member type int_type is an integral type able to represent any character value or the special end-of-file value.
Data races
Accesses the basic_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
- basic_stringbuf::overflow
- Put character (protected virtual member function)
- basic_streambuf::sgetc
- Get current character (public member function)
- basic_streambuf::uflow
- Get character on underflow and advance position (protected virtual member function)