__GNU_CXX::CHAR_TRAITS(3cxx)
π __gnu_cxx::char_traits< _CharT > β manual section 3cxx π
β¨ NAME β¨
okay so bestie, this page is for __gnu_cxx::char_traits< _CharT >, and the NAME tea is: Base class used to implement std::char_traits. Thatβs the whole assignment, no cap. π
πΈ SYNOPSIS πΈ
#include <char_traits.h>
Itβs inherited by std::char_traits< _CharT >. Slay.
π Public Types π
typedef _CharT char_typeβ the character type itself, literally.using comparison_category = std::strong_orderingβ the comparison category alias, exactly as written.typedef _Char_types< _CharT >::int_type int_typeβ theint_typealias from_Char_types< _CharT >.typedef _Char_types< _CharT >::off_type off_typeβ theoff_typealias from_Char_types< _CharT >.typedef _Char_types< _CharT >::pos_type pos_typeβ thepos_typealias from_Char_types< _CharT >.typedef _Char_types< _CharT >::state_type state_typeβ thestate_typealias from_Char_types< _CharT >.
π«Ά Static Public Member Functions π«Ά
assign(reference version) βstatic constexpr void assign (char_type &__c1, const char_type &__c2)assign(pointer version) βstatic constexpr char_type * assign (char_type *__s, std::size_t __n, char_type __a)compareβstatic constexpr int compare (const char_type *__s1, const char_type *__s2, std::size_t __n)copyβstatic constexpr char_type * copy (char_type *__s1, const char_type *__s2, std::size_t __n)eqβstatic constexpr bool eq (const char_type &__c1, const char_type &__c2)eq_int_typeβstatic constexpr bool eq_int_type (const int_type &__c1, const int_type &__c2)findβstatic constexpr const char_type * find (const char_type *__s, std::size_t __n, const char_type &__a)lengthβstatic constexpr std::size_t length (const char_type *__s)ltβstatic constexpr bool lt (const char_type &__c1, const char_type &__c2)moveβstatic constexpr char_type * move (char_type *__s1, const char_type *__s2, std::size_t __n)to_char_typeβstatic constexpr char_type to_char_type (const int_type &__c)to_int_typeβstatic constexpr int_type to_int_type (const char_type &__c)
π₯ Detailed Description π₯
template<typename _CharT>
struct __gnu_cxx::char_traits< _CharT >
This is the βBase class used to implement std::char_traits.β Itβs giving foundational, main-character energy, but for character traits. π
π Note π
Note: For any given actual character type, this definition is probably wrong. (Most of the member functions are likely to be right, but theint_typeandstate_typetypedefs, and theeof()member function, are likely to be wrong.) The reason this class exists is so users can specialize it. Classes in namespacestdmay not be specialized for fundamental types, but classes in namespace__gnu_cxxmay 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. π«Ά
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. (No cap, thatβs the actual author line.) π
sign-off: source/version is libstdc++ / manual section 3cxx; date: not printed in the original footer text, so Iβm not inventing one, bestie. mwah π π«Ά
π¦ where this page comes from
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms