Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

char_traits Struct

The char_traits struct describes attributes associated with a character.

For a list of all members of this type, see char_traits Members.

template <
   class CharType
> struct char_traits;

CharType

The element data type.

The template struct describes various character traits for type CharType. The template class basic_string as well as several iostream template classes, including basic_ios, use this information to manipulate elements of type CharType. Such an element type must not require explicit construction or destruction. It must supply a default constructor, a copy constructor, and an assignment operator, with the expected semantics. A bitwise copy must have the same effect as an assignment. None of the member functions of struct char_traits can throw exceptions.

Header: <string>

Namespace: std

Community Additions

ADD
Show:
© 2015 Microsoft