public static member function
<string>

std::char_traits::not_eof

static int_type not_eof(const int_type& c);
static constexpr int_type not_eof(int_type c) noexcept;
Not End-of-File character
Returns a value that is guaranteed to not be an End-of-File.

If c is not an End-of-File character, it always returns c unchanged. Otherwise, some implementation-defined value that is not an End-of-File character.

All character traits types shall implement the function so that the returned value compares different from eof() using member eq_int_type.

参数

c
Value.
成员类型int_type是一个整数类型,可以表示 eof() 或任何有效的字符值。

返回值

c if c is not an End-of-File value, and some other value otherwise.

成员类型int_type是一个整数类型,可以表示 eof() 或任何有效的字符值。

复杂度

常量。

异常安全

无异常保证:此成员函数从不抛出异常。

另见