cpp/io/basic stringbuf/underflow

Reads the next character from the get area of the buffer.

Specifically:

@1@ If the input sequence has a read position available, returns

@2@ Otherwise, if (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

@3@ Otherwise, returns.

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
(the next character to read in the get area) in case of success, or in case of failure.