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

< cpp‎ | string‎ | char traits


static int_type to_int_type( char_type c );
(C++11 起为 constexpr)
(C++11 起为 noexcept)

c 转换到 int_type

对字符特征的关于 X::to_int_type 的通用要求请参考字符特征 (CharTraits)

参数

c - 要转换的值

返回值

等价于 c 的值。

复杂度

常数。

注意

对于每个 char_type 的合法值,都有一个与 eof() 不同的 int_type 值。