21 Strings library [strings]

21.2 Character traits [char.traits]

21.2.2 traits typedefs [char.traits.typedefs]

typedef CHAR_T char_type;

The type char_type is used to refer to the character container type in the implementation of the library classes defined in [string.classes] and Clause [input.output].

typedef INT_T int_type;

Requires: For a certain character container type char_type, a related container type INT_T shall be a type or class which can represent all of the valid characters converted from the corresponding char_type values, as well as an end-of-file value, eof(). The type int_type represents a character container type which can hold end-of-file to be used as a return type of the iostream class member functions.233

typedef implementation-defined off_type; typedef implementation-defined pos_type;

Requires: Requirements for off_type and pos_type are described in [iostreams.limits.pos] and [iostream.forward].

typedef STATE_T state_type;

Requires: state_type shall meet the requirements of CopyAssignable (Table [copyassignable]), CopyConstructible (Table [copyconstructible]), and DefaultConstructible (Table [defaultconstructible]) types.

If eof() can be held in char_type then some iostreams operations may give surprising results.