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;
轉換為字元型別
返回 cchar_type等效值。

如果 c 沒有對應的有效字元值,則該函式返回一些實現定義的值。

所有字元特徵型別應實現該函式,以便返回的值轉換回int_typeto_int_type 比較等於 c(使用 成員 eq_int_type),如果 c 表示一個有效的字元值。

引數

c
值。
成員型別int_type是一個整數型別,可以表示 eof() 或任何有效的字元值。

返回值

要放回的字元的char_type等效值。

成員型別char_type字元型別(即,char_traits 中的類模板引數)。

複雜度

常量。

異常安全

無異常保證:此成員函式從不丟擲異常。

另見