.TH "__gnu_cxx::char_traits< _CharT >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_cxx::char_traits< _CharT > \- Base class used to implement std::char_traits\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBstd::char_traits< _CharT >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _CharT \fBchar_type\fP" .br .ti -1c .RI "typedef \fB_Char_types\fP< _CharT >::int_type \fBint_type\fP" .br .ti -1c .RI "typedef \fB_Char_types\fP< _CharT >::off_type \fBoff_type\fP" .br .ti -1c .RI "typedef \fB_Char_types\fP< _CharT >::pos_type \fBpos_type\fP" .br .ti -1c .RI "typedef \fB_Char_types\fP< _CharT >::state_type \fBstate_type\fP" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static _GLIBCXX14_CONSTEXPR void \fBassign\fP (char_type &__c1, const char_type &__c2)" .br .ti -1c .RI "static char_type * \fBassign\fP (char_type *__s, std::size_t __n, char_type __a)" .br .ti -1c .RI "static _GLIBCXX14_CONSTEXPR int \fBcompare\fP (const char_type *__s1, const char_type *__s2, std::size_t __n)" .br .ti -1c .RI "static char_type * \fBcopy\fP (char_type *__s1, const char_type *__s2, std::size_t __n)" .br .ti -1c .RI "static constexpr int_type \fBeof\fP ()" .br .ti -1c .RI "static constexpr bool \fBeq\fP (const char_type &__c1, const char_type &__c2)" .br .ti -1c .RI "static constexpr bool \fBeq_int_type\fP (const int_type &__c1, const int_type &__c2)" .br .ti -1c .RI "static _GLIBCXX14_CONSTEXPR const char_type * \fBfind\fP (const char_type *__s, std::size_t __n, const char_type &__a)" .br .ti -1c .RI "static _GLIBCXX14_CONSTEXPR std::size_t \fBlength\fP (const char_type *__s)" .br .ti -1c .RI "static constexpr bool \fBlt\fP (const char_type &__c1, const char_type &__c2)" .br .ti -1c .RI "static char_type * \fBmove\fP (char_type *__s1, const char_type *__s2, std::size_t __n)" .br .ti -1c .RI "static constexpr int_type \fBnot_eof\fP (const int_type &__c)" .br .ti -1c .RI "static constexpr char_type \fBto_char_type\fP (const int_type &__c)" .br .ti -1c .RI "static constexpr int_type \fBto_int_type\fP (const char_type &__c)" .br .in -1c .SH "Detailed Description" .PP .SS "template .br struct __gnu_cxx::char_traits< _CharT >"Base class used to implement std::char_traits\&. .PP \fBNote\fP .RS 4 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\&. .RE .PP 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 \fIunusual\fP character types\&. Also, check out include/ext/pod_char_traits\&.h\&. .PP Definition at line \fB87\fP of file \fBchar_traits\&.h\fP\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _CharT \fB__gnu_cxx::char_traits\fP< _CharT >::char_type" .PP Definition at line \fB89\fP of file \fBchar_traits\&.h\fP\&. .SS "template typedef \fB_Char_types\fP<_CharT>::int_type \fB__gnu_cxx::char_traits\fP< _CharT >::int_type" .PP Definition at line \fB90\fP of file \fBchar_traits\&.h\fP\&. .SS "template typedef \fB_Char_types\fP<_CharT>::off_type \fB__gnu_cxx::char_traits\fP< _CharT >::off_type" .PP Definition at line \fB92\fP of file \fBchar_traits\&.h\fP\&. .SS "template typedef \fB_Char_types\fP<_CharT>::pos_type \fB__gnu_cxx::char_traits\fP< _CharT >::pos_type" .PP Definition at line \fB91\fP of file \fBchar_traits\&.h\fP\&. .SS "template typedef \fB_Char_types\fP<_CharT>::state_type \fB__gnu_cxx::char_traits\fP< _CharT >::state_type" .PP Definition at line \fB93\fP of file \fBchar_traits\&.h\fP\&. .SH "Member Function Documentation" .PP .SS "template static _GLIBCXX14_CONSTEXPR void \fB__gnu_cxx::char_traits\fP< _CharT >::assign (char_type & __c1, const char_type & __c2)\fC [inline]\fP, \fC [static]\fP" .PP Definition at line \fB96\fP of file \fBchar_traits\&.h\fP\&. .SS "template \fBchar_traits\fP< _CharT >::char_type * \fB__gnu_cxx::char_traits\fP< _CharT >::assign (char_type * __s, std::size_t __n, char_type __a)\fC [static]\fP" .PP Definition at line \fB204\fP of file \fBchar_traits\&.h\fP\&. .SS "template _GLIBCXX14_CONSTEXPR int \fB__gnu_cxx::char_traits\fP< _CharT >::compare (const char_type * __s1, const char_type * __s2, std::size_t __n)\fC [static]\fP" .PP Definition at line \fB148\fP of file \fBchar_traits\&.h\fP\&. .SS "template \fBchar_traits\fP< _CharT >::char_type * \fB__gnu_cxx::char_traits\fP< _CharT >::copy (char_type * __s1, const char_type * __s2, std::size_t __n)\fC [static]\fP" .PP Definition at line \fB194\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr int_type \fB__gnu_cxx::char_traits\fP< _CharT >::eof ()\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB138\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr bool \fB__gnu_cxx::char_traits\fP< _CharT >::eq (const char_type & __c1, const char_type & __c2)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB100\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr bool \fB__gnu_cxx::char_traits\fP< _CharT >::eq_int_type (const int_type & __c1, const int_type & __c2)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB134\fP of file \fBchar_traits\&.h\fP\&. .SS "template _GLIBCXX14_CONSTEXPR const \fBchar_traits\fP< _CharT >::char_type * \fB__gnu_cxx::char_traits\fP< _CharT >::find (const char_type * __s, std::size_t __n, const char_type & __a)\fC [static]\fP" .PP Definition at line \fB172\fP of file \fBchar_traits\&.h\fP\&. .SS "template _GLIBCXX14_CONSTEXPR std::size_t \fB__gnu_cxx::char_traits\fP< _CharT >::length (const char_type * __s)\fC [static]\fP" .PP Definition at line \fB161\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr bool \fB__gnu_cxx::char_traits\fP< _CharT >::lt (const char_type & __c1, const char_type & __c2)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB104\fP of file \fBchar_traits\&.h\fP\&. .SS "template \fBchar_traits\fP< _CharT >::char_type * \fB__gnu_cxx::char_traits\fP< _CharT >::move (char_type * __s1, const char_type * __s2, std::size_t __n)\fC [static]\fP" .PP Definition at line \fB183\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr int_type \fB__gnu_cxx::char_traits\fP< _CharT >::not_eof (const int_type & __c)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB142\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr char_type \fB__gnu_cxx::char_traits\fP< _CharT >::to_char_type (const int_type & __c)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB126\fP of file \fBchar_traits\&.h\fP\&. .SS "template static constexpr int_type \fB__gnu_cxx::char_traits\fP< _CharT >::to_int_type (const char_type & __c)\fC [inline]\fP, \fC [static]\fP, \fC [constexpr]\fP" .PP Definition at line \fB130\fP of file \fBchar_traits\&.h\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.