std::basic_stringbuf<CharT,Traits,Allocator>::underflow (3) - Linux Manuals
std::basic_stringbuf<CharT,Traits,Allocator>::underflow: std::basic_stringbuf<CharT,Traits,Allocator>::underflow
NAME
std::basic_stringbuf<CharT,Traits,Allocator>::underflow - std::basic_stringbuf<CharT,Traits,Allocator>::underflow
Synopsis
protected:
virtual int_type underflow()
Reads the next character from the get area of the buffer.
Specifically:
1) If the input sequence has a read position available (egptr() > gptr()), returns Traits::to_int_type(*gptr())
2) Otherwise, if pptr() > egptr() (some characters were inserted into the stream since the last time overflow() changed egptr()) then extends the end of the get area to include the most recently inserted characters, by changing egptr() to equal pptr(), and then returns Traits::to_int_type(*gptr())
3) Otherwise, returns Traits::eof().
Any character in the buffer which has been initialized, regardless of whether it originated from the string passed in the constructor or was appended by overflow(), is considered to be part of the input sequence.
Parameters
(none)
Return value
Traits::to_int_type(*gptr()) (the next character to read in the get area) in case of success, or Traits::eof() in case of failure.
Example
// Run this code