##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::char_traits::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 ); |  | (since C++11)

Converts a value of `int_type` to `char_type`. If there are no equivalent value, the results are unspecified.

### [edit] Parameters

c | - | value to convert

### [edit] Return value

A value equivalent to `c`.

### [edit] Exceptions

(none) | (until C++11)
`noexcept` specification: noexcept | (since C++11)

### [edit] Complexity

Constant.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/string/char_traits/to_char_type&oldid=91567"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template