std::basic_filebuf<CharT,Traits>::underflow (3) - Linux Manuals
std::basic_filebuf<CharT,Traits>::underflow: std::basic_filebuf<CharT,Traits>::underflow
NAME
std::basic_filebuf<CharT,Traits>::underflow - std::basic_filebuf<CharT,Traits>::underflow
Synopsis
protected:
virtual int_type underflow()
Reads more data into the input area.
Behaves like the base class std::basic_streambuf::underflow, except that to read the data from the associated character sequence (the file) into the get area, first reads the bytes from the file into a temporary buffer (allocated as large as necessary), then uses std::codecvt::in of the imbued locale to convert the external (typically, multibyte) representation to the internal form which is then used to populate the get area. The conversion may be skipped if the locale's std::codecvt::always_noconv returns true
Parameters
(none)
Return value
Traits::to_int_type(*gptr()) (the first character of the pending sequence) in case of success, or Traits::eof() in case of failure.
Example
// Run this code
Possible output:
See also
underflow reads characters from the associated input sequence to the get area
[virtual]
underflow returns the next character available in the input sequence
[virtual]
underflow reads a character from the input sequence without advancing the next pointer
[virtual]
uflow reads from the associated file and advances the next pointer in the get area
[virtual]
overflow writes characters to the associated file from the put area
[virtual]
sgetc (public member function of std::basic_streambuf<CharT,Traits>)