public static member function
<string>

std::char_traits::to_char_type

static char_type to_char_type (const int_type& c);
static constexpr char_type to_char_type (int_type c) noexcept;
To char type
Returns the char_type equivalent of c.

If c has no corresponding valid character value, the function returns some implementation-defined value.

All character traits types shall implement the function so that the returned value transformed back to int_type with to_int_type compares equal to to c (using member eq_int_type), if c represented a valid character value.

Parameters

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

Return Value

The char_type equivalent of c.

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

Complexity

Constant.

Exception safety

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

See also