protected virtual member function
<fstream>
Get character on overflow and advance position
Returns the character at the current input position, and advances the input position pointer.
Before that, this function attempts to read characters from the associated file and -if the object keeps an intermediate buffer- makes them available by altering the internal input buffer pointers (gptr, egptr and eback) as needed.
If there are no more characters available and the function did not succeed in reading more characters from the associated file, it returns the end-of-file value (traits_type::eof()
), indicating failure.
This virtual member function overrides the inherited member basic_streambuf::uflow, called by members such as sbumpc to request a new character when there are no read positions available at the get pointer (gptr).
The behavior of this member function is similar to that of underflow, except that this function advances the input position.
異常安全
基本保證:如果丟擲異常,*檔案流緩衝區*處於有效狀態。