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 起為 constexpr) (C++11 起無異常丟擲) |
|
將 c 轉換為 char_type
。如果沒有等價的 char_type
值(例如當 c 是 eof()
值的一個副本時),結果是未指定的。
關於 X::to_char_type
的字元特性的一般要求,請參閱 CharTraits。
[編輯] 引數
c | - | 要轉換的值 |
[編輯] 返回值
等價於 c 的值。
[編輯] 複雜度
常數時間。