protected virtual member function
<fstream>

std::basic_filebuf::uflow

int_type uflow();
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.

参数



返回值

受控输入序列当前位置的字符,使用成员 traits_type::to_int_type 转换为 int_type 类型的值。
If there are no more characters to read from the controlled input sequence, it returns the end-of-file value (traits_type::eof()).
成员类型int_type是能够表示任何字符值或特殊*文件结束*符的整型。

数据竞争

修改 basic_filebuf 对象。
同时访问同一个文件流缓冲区对象可能导致数据争用。

异常安全

基本保证:如果抛出异常,*文件流缓冲区*处于有效状态。

另见