Namespaces
Variants

std::char_traits<char>:: not_eof, std::char_traits<wchar_t>:: not_eof, std::char_traits<char8_t>:: not_eof, std::char_traits<char16_t>:: not_eof, std::char_traits<char32_t>:: not_eof

From cppreference.net
static int_type not_eof ( int_type e ) ;
(自 C++11 起为 constexpr)
(自 C++11 起为 noexcept)

给定 e ,生成一个不等于 eof 的适当值。

该函数通常在需要返回除 eof 之外的值时使用,例如在实现 std::basic_streambuf::overflow() 时。

请参阅 CharTraits 了解关于 X::not_eof 字符特性的通用要求。

目录

参数

e - 待分析值

返回值

e eof 值不相等,则返回 e ;否则返回某个其他非 eof 值。

复杂度

常量。

参见

[static]
返回一个 eof
(公开静态成员函数)