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
来自cppreference.com
< cpp | string | char traits
| static char_type to_char_type( int_type c ); |
(C++11 前) | |
| static constexpr char_type to_char_type( int_type c ) noexcept; |
(C++11 起) | |
将 c转换到 char_type。如果不存在等价的 char_type 值(例如 c 是 eof() 值的副本),那么结果未指定。
对字符特性的关于 X::to_char_type 的通用要求参考字符特性 (CharTraits) 。
参数
| c | - | 要转换的值 |
返回值
等于 c 的值。
复杂度
常数。