public static member function
<string>

std::char_traits::to_int_type

static int_type to_int_type (const char_type& c);
static constexpr int_type to_int_type (char_type c) noexcept;
To int type
Returns theint_typeequivalent of c.

All character traits types shall implement the function so that the returned value can be transformed back to itschar_typevalue using char_traits::to_char_type.

In the standard specializations of char_traits, this function performs the corresponding built-in integral promotion.

引數

c
字元值。
成員型別char_type字元型別(即,char_traits 中的類模板引數)。

返回值

要放回的字元的int_typeequivalent of c.

成員型別int_type是一個整數型別,可以表示 eof() 或任何有效的字元值。

複雜度

常量。

異常安全

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

另見