Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | string‎ | char traits
static char_type to_char_type( int_type c );
(until C++11)
static constexpr char_type to_char_type( int_type c ) noexcept;
(since C++11)

Converts c to char_type. If there is no equivalent char_type value (such as when c is a copy of the eof() value), the result is unspecified.

See CharTraits for the general requirements on character traits for X::to_char_type.

[edit] Parameters

c - value to convert

[edit] Return value

A value equivalent to c.

[edit] Complexity

Constant.