GNU g++  v5.2.1
GNU Standard C++
char_traits.h File Reference

This is an internal header file, included by other library headers. More...

#include <bits/stl_algobase.h>
#include <bits/postypes.h>
#include <cwchar>
Include dependency graph for char_traits.h:
This graph shows which files directly or indirectly include this file:

Functions

namespace __gnu_cxx _GLIBCXX_VISIBILITY (default)
 

Detailed Description

This is an internal header file, included by other library headers.

Do not attempt to use it directly. {string}

Function Documentation

namespace __gnu_cxx _GLIBCXX_VISIBILITY ( default  )

Mapping from character type to associated types.

Note
This is an implementation class for the generic version of char_traits. It defines int_type, off_type, pos_type, and state_type. By default these are unsigned long, streamoff, streampos, and mbstate_t. Users who need a different set of types, but who don't need to change the definitions of any function defined in char_traits, can specialize __gnu_cxx::_Char_types while leaving __gnu_cxx::char_traits alone.

Base class used to implement std::char_traits.

Note
For any given actual character type, this definition is probably wrong. (Most of the member functions are likely to be right, but the int_type and state_type typedefs, and the eof() member function, are likely to be wrong.) The reason this class exists is so users can specialize it. Classes in namespace std may not be specialized for fundamental types, but classes in namespace __gnu_cxx may be.

See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types for advice on how to make use of this class for unusual character types. Also, check out include/ext/pod_char_traits.h.

Basis for explicit traits specializations.

Note
For any given actual character type, this definition is probably wrong. Since this is just a thin wrapper around __gnu_cxx::char_traits, it is possible to achieve a more appropriate definition by specializing __gnu_cxx::char_traits.

See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types for advice on how to make use of this class for unusual character types. Also, check out include/ext/pod_char_traits.h.

21.1.3.1 char_traits specializations