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 the int_type equivalent of c.

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

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

Parameters

c
Character value.
Member type char_type is the character type (i.e., the class template parameter in char_traits).

Return Value

The int_type equivalent of c.

Member type int_type is an integral type that can represent eof() or any valid character value.

Complexity

Constant.

Exception safety

No-throw guarantee: this member function never throws exceptions.

See also