This function attempts to extract the current item from the input buffer and advance the current stream position. The item is returned as (int)(unsigned char).
vvirtual int_type underflow();
The virtual function underflow() is called when a character is not available for input.
There are many constraints for underflow().
The pending sequence of characters is a concatenation of end pointer minus the get pointer plus some sequence of characters to be read from input.
Returns the result character if the sequence is not empty, which is the first character in the sequence or the next character in the sequence.
Returns the backup sequence if the beginning pointer is null or the sequence is empty. Otherwise the sequence is the get pointer minus the beginning pointer.
If the position is null, returns traits::eof() to indicate failure. Otherwise, it returns the current element in the input stream.