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() 或任何有效的字元值。

複雜度

常量。

異常安全

無異常保證:此成員函式從不丟擲異常。

另見