35#define _CHAR_TRAITS_H 1
37#pragma GCC system_header
41#if __cplusplus >= 201103L
43#if !defined __UINT_LEAST16_TYPE__ || !defined __UINT_LEAST32_TYPE__
47#if __cplusplus >= 202002L
52#ifndef _GLIBCXX_ALWAYS_INLINE
53# define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
56namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
58_GLIBCXX_BEGIN_NAMESPACE_VERSION
60#pragma GCC diagnostic push
61#pragma GCC diagnostic ignored "-Wstringop-overflow"
62#pragma GCC diagnostic ignored "-Wstringop-overread"
63#pragma GCC diagnostic ignored "-Warray-bounds"
75 template<
typename _CharT>
78 typedef unsigned long int_type;
81 typedef std::mbstate_t state_type;
100 template<
typename _CharT>
103 typedef _CharT char_type;
104 typedef typename _Char_types<_CharT>::int_type int_type;
106 typedef typename _Char_types<_CharT>::off_type off_type;
107 typedef typename _Char_types<_CharT>::state_type state_type;
108#if __cpp_lib_three_way_comparison
109 using comparison_category = std::strong_ordering;
112 static _GLIBCXX14_CONSTEXPR
void
113 assign(char_type& __c1,
const char_type& __c2)
115#if __cpp_constexpr_dynamic_alloc
116 if (std::__is_constant_evaluated())
117 std::construct_at(__builtin_addressof(__c1), __c2);
123 static _GLIBCXX_CONSTEXPR
bool
124 eq(
const char_type& __c1,
const char_type& __c2)
125 {
return __c1 == __c2; }
127 static _GLIBCXX_CONSTEXPR
bool
128 lt(
const char_type& __c1,
const char_type& __c2)
129 {
return __c1 < __c2; }
131 static _GLIBCXX14_CONSTEXPR
int
132 compare(
const char_type* __s1,
const char_type* __s2, std::size_t __n);
134 static _GLIBCXX14_CONSTEXPR std::size_t
135 length(
const char_type* __s);
137 static _GLIBCXX14_CONSTEXPR
const char_type*
138 find(
const char_type* __s, std::size_t __n,
const char_type& __a);
140 static _GLIBCXX20_CONSTEXPR char_type*
141 move(char_type* __s1,
const char_type* __s2, std::size_t __n);
143 static _GLIBCXX20_CONSTEXPR char_type*
144 copy(char_type* __s1,
const char_type* __s2, std::size_t __n);
146 static _GLIBCXX20_CONSTEXPR char_type*
147 assign(char_type* __s, std::size_t __n, char_type __a);
149 static _GLIBCXX_CONSTEXPR char_type
150 to_char_type(
const int_type& __c)
151 {
return static_cast<char_type
>(__c); }
153 static _GLIBCXX_CONSTEXPR int_type
154 to_int_type(
const char_type& __c)
155 {
return static_cast<int_type
>(__c); }
157 static _GLIBCXX_CONSTEXPR
bool
158 eq_int_type(
const int_type& __c1,
const int_type& __c2)
159 {
return __c1 == __c2; }
161 static _GLIBCXX_CONSTEXPR int_type
163 {
return static_cast<int_type
>(_GLIBCXX_STDIO_EOF); }
165 static _GLIBCXX_CONSTEXPR int_type
166 not_eof(
const int_type& __c)
167 {
return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
170 template<
typename _CharT>
171 _GLIBCXX14_CONSTEXPR
int
173 compare(
const char_type* __s1,
const char_type* __s2, std::size_t __n)
175 for (std::size_t __i = 0; __i < __n; ++__i)
176 if (lt(__s1[__i], __s2[__i]))
178 else if (lt(__s2[__i], __s1[__i]))
183 template<
typename _CharT>
184 _GLIBCXX14_CONSTEXPR std::size_t
185 char_traits<_CharT>::
186 length(
const char_type* __p)
189 while (!eq(__p[__i], char_type()))
194 template<
typename _CharT>
195 _GLIBCXX14_CONSTEXPR
const typename char_traits<_CharT>::char_type*
196 char_traits<_CharT>::
197 find(
const char_type* __s, std::size_t __n,
const char_type& __a)
199 for (std::size_t __i = 0; __i < __n; ++__i)
200 if (eq(__s[__i], __a))
205 template<
typename _CharT>
207 typename char_traits<_CharT>::char_type*
208 char_traits<_CharT>::
209 move(char_type* __s1,
const char_type* __s2, std::size_t __n)
213#if __cplusplus >= 202002L
214 if (std::__is_constant_evaluated())
218 const auto __end = __s2 + __n - 1;
219 bool __overlap =
false;
220 for (std::size_t __i = 0; __i < __n - 1; ++__i)
222 if (__s1 + __i == __end)
233 assign(__s1[__n], __s2[__n]);
238 copy(__s1, __s2, __n);
242 __builtin_memmove(__s1, __s2, __n *
sizeof(char_type));
246 template<
typename _CharT>
248 typename char_traits<_CharT>::char_type*
249 char_traits<_CharT>::
250 copy(char_type* __s1,
const char_type* __s2, std::size_t __n)
252#if __cplusplus >= 202002L
253 if (std::__is_constant_evaluated())
255 for (std::size_t __i = 0; __i < __n; ++__i)
256 std::construct_at(__s1 + __i, __s2[__i]);
261 __builtin_memcpy(__s1, __s2, __n *
sizeof(char_type));
265 template<
typename _CharT>
267 typename char_traits<_CharT>::char_type*
268 char_traits<_CharT>::
269 assign(char_type* __s, std::size_t __n, char_type __a)
271#if __cplusplus >= 202002L
272 if (std::__is_constant_evaluated())
274 for (std::size_t __i = 0; __i < __n; ++__i)
275 std::construct_at(__s + __i, __a);
280 if _GLIBCXX17_CONSTEXPR (
sizeof(_CharT) == 1 && __is_trivial(_CharT))
283 __builtin_memcpy(&__c, __builtin_addressof(__a), 1);
284 __builtin_memset(__s, __c, __n);
288 for (std::size_t __i = 0; __i < __n; ++__i)
294_GLIBCXX_END_NAMESPACE_VERSION
297namespace std _GLIBCXX_VISIBILITY(default)
299_GLIBCXX_BEGIN_NAMESPACE_VERSION
301#ifdef __cpp_lib_is_constant_evaluated
303# define __cpp_lib_constexpr_char_traits 201811L
304#elif __cplusplus >= 201703L && _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
306# define __cpp_lib_constexpr_char_traits 201611L
322 template<
typename _CharT>
331 typedef char char_type;
332 typedef int int_type;
335 typedef mbstate_t state_type;
336#if __cpp_lib_three_way_comparison
337 using comparison_category = strong_ordering;
340 static _GLIBCXX17_CONSTEXPR
void
341 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
343#if __cpp_constexpr_dynamic_alloc
344 if (std::__is_constant_evaluated())
345 std::construct_at(__builtin_addressof(__c1), __c2);
351 static _GLIBCXX_CONSTEXPR
bool
352 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
353 {
return __c1 == __c2; }
355 static _GLIBCXX_CONSTEXPR
bool
356 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
359 return (
static_cast<unsigned char>(__c1)
360 <
static_cast<unsigned char>(__c2));
363 static _GLIBCXX17_CONSTEXPR
int
364 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
368#if __cplusplus >= 201703L
369 if (std::__is_constant_evaluated())
371 for (
size_t __i = 0; __i < __n; ++__i)
372 if (lt(__s1[__i], __s2[__i]))
374 else if (lt(__s2[__i], __s1[__i]))
379 return __builtin_memcmp(__s1, __s2, __n);
382 static _GLIBCXX17_CONSTEXPR
size_t
383 length(
const char_type* __s)
385#if __cplusplus >= 201703L
386 if (std::__is_constant_evaluated())
389 return __builtin_strlen(__s);
392 static _GLIBCXX17_CONSTEXPR
const char_type*
393 find(
const char_type* __s,
size_t __n,
const char_type& __a)
397#if __cplusplus >= 201703L
398 if (std::__is_constant_evaluated())
401 return static_cast<const char_type*
>(__builtin_memchr(__s, __a, __n));
404 static _GLIBCXX20_CONSTEXPR char_type*
405 move(char_type* __s1,
const char_type* __s2,
size_t __n)
409#if __cplusplus >= 202002L
410 if (std::__is_constant_evaluated())
413 return static_cast<char_type*
>(__builtin_memmove(__s1, __s2, __n));
416 static _GLIBCXX20_CONSTEXPR char_type*
417 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
421#if __cplusplus >= 202002L
422 if (std::__is_constant_evaluated())
425 return static_cast<char_type*
>(__builtin_memcpy(__s1, __s2, __n));
428 static _GLIBCXX20_CONSTEXPR char_type*
429 assign(char_type* __s,
size_t __n, char_type __a)
433#if __cplusplus >= 202002L
434 if (std::__is_constant_evaluated())
437 return static_cast<char_type*
>(__builtin_memset(__s, __a, __n));
440 static _GLIBCXX_CONSTEXPR char_type
441 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
442 {
return static_cast<char_type
>(__c); }
446 static _GLIBCXX_CONSTEXPR int_type
447 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
448 {
return static_cast<int_type
>(
static_cast<unsigned char>(__c)); }
450 static _GLIBCXX_CONSTEXPR
bool
451 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
452 {
return __c1 == __c2; }
454 static _GLIBCXX_CONSTEXPR int_type
455 eof() _GLIBCXX_NOEXCEPT
456 {
return static_cast<int_type
>(_GLIBCXX_STDIO_EOF); }
458 static _GLIBCXX_CONSTEXPR int_type
459 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
460 {
return (__c == eof()) ? 0 : __c; }
464#ifdef _GLIBCXX_USE_WCHAR_T
469 typedef wchar_t char_type;
470 typedef wint_t int_type;
473 typedef mbstate_t state_type;
474#if __cpp_lib_three_way_comparison
475 using comparison_category = strong_ordering;
478 static _GLIBCXX17_CONSTEXPR
void
479 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
481#if __cpp_constexpr_dynamic_alloc
482 if (std::__is_constant_evaluated())
483 std::construct_at(__builtin_addressof(__c1), __c2);
489 static _GLIBCXX_CONSTEXPR
bool
490 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
491 {
return __c1 == __c2; }
493 static _GLIBCXX_CONSTEXPR
bool
494 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
495 {
return __c1 < __c2; }
497 static _GLIBCXX17_CONSTEXPR
int
498 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
502#if __cplusplus >= 201703L
503 if (std::__is_constant_evaluated())
506 return wmemcmp(__s1, __s2, __n);
509 static _GLIBCXX17_CONSTEXPR
size_t
510 length(
const char_type* __s)
512#if __cplusplus >= 201703L
513 if (std::__is_constant_evaluated())
519 static _GLIBCXX17_CONSTEXPR
const char_type*
520 find(
const char_type* __s,
size_t __n,
const char_type& __a)
524#if __cplusplus >= 201703L
525 if (std::__is_constant_evaluated())
528 return wmemchr(__s, __a, __n);
531 static _GLIBCXX20_CONSTEXPR char_type*
532 move(char_type* __s1,
const char_type* __s2,
size_t __n)
536#if __cplusplus >= 202002L
537 if (std::__is_constant_evaluated())
540 return wmemmove(__s1, __s2, __n);
543 static _GLIBCXX20_CONSTEXPR char_type*
544 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
548#if __cplusplus >= 202002L
549 if (std::__is_constant_evaluated())
552 return wmemcpy(__s1, __s2, __n);
555 static _GLIBCXX20_CONSTEXPR char_type*
556 assign(char_type* __s,
size_t __n, char_type __a)
560#if __cplusplus >= 202002L
561 if (std::__is_constant_evaluated())
564 return wmemset(__s, __a, __n);
567 static _GLIBCXX_CONSTEXPR char_type
568 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
569 {
return char_type(__c); }
571 static _GLIBCXX_CONSTEXPR int_type
572 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
573 {
return int_type(__c); }
575 static _GLIBCXX_CONSTEXPR
bool
576 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
577 {
return __c1 == __c2; }
579 static _GLIBCXX_CONSTEXPR int_type
580 eof() _GLIBCXX_NOEXCEPT
581 {
return static_cast<int_type
>(WEOF); }
583 static _GLIBCXX_CONSTEXPR int_type
584 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
585 {
return eq_int_type(__c, eof()) ? 0 : __c; }
593#ifdef _GLIBCXX_USE_CHAR8_T
595 struct char_traits<char8_t>
597 typedef char8_t char_type;
598 typedef unsigned int int_type;
599 typedef u8streampos pos_type;
601 typedef mbstate_t state_type;
602#if __cpp_lib_three_way_comparison
603 using comparison_category = strong_ordering;
606 static _GLIBCXX17_CONSTEXPR
void
607 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
609#if __cpp_constexpr_dynamic_alloc
610 if (std::__is_constant_evaluated())
611 std::construct_at(__builtin_addressof(__c1), __c2);
617 static _GLIBCXX_CONSTEXPR
bool
618 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
619 {
return __c1 == __c2; }
621 static _GLIBCXX_CONSTEXPR
bool
622 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
623 {
return __c1 < __c2; }
625 static _GLIBCXX17_CONSTEXPR
int
626 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
630#if __cplusplus >= 201703L
631 if (std::__is_constant_evaluated())
634 return __builtin_memcmp(__s1, __s2, __n);
637 static _GLIBCXX17_CONSTEXPR
size_t
638 length(
const char_type* __s)
640#if __cplusplus >= 201703L
641 if (std::__is_constant_evaluated())
645 while (!eq(__s[__i], char_type()))
650 static _GLIBCXX17_CONSTEXPR
const char_type*
651 find(
const char_type* __s,
size_t __n,
const char_type& __a)
655#if __cplusplus >= 201703L
656 if (std::__is_constant_evaluated())
659 return static_cast<const char_type*
>(__builtin_memchr(__s, __a, __n));
662 static _GLIBCXX20_CONSTEXPR char_type*
663 move(char_type* __s1,
const char_type* __s2,
size_t __n)
667#if __cplusplus >= 202002L
668 if (std::__is_constant_evaluated())
671 return static_cast<char_type*
>(__builtin_memmove(__s1, __s2, __n));
674 static _GLIBCXX20_CONSTEXPR char_type*
675 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
679#if __cplusplus >= 202002L
680 if (std::__is_constant_evaluated())
683 return static_cast<char_type*
>(__builtin_memcpy(__s1, __s2, __n));
686 static _GLIBCXX20_CONSTEXPR char_type*
687 assign(char_type* __s,
size_t __n, char_type __a)
691#if __cplusplus >= 202002L
692 if (std::__is_constant_evaluated())
695 return static_cast<char_type*
>(__builtin_memset(__s, __a, __n));
698 static _GLIBCXX_CONSTEXPR char_type
699 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
700 {
return char_type(__c); }
702 static _GLIBCXX_CONSTEXPR int_type
703 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
704 {
return int_type(__c); }
706 static _GLIBCXX_CONSTEXPR
bool
707 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
708 {
return __c1 == __c2; }
710 static _GLIBCXX_CONSTEXPR int_type
711 eof() _GLIBCXX_NOEXCEPT
712 {
return static_cast<int_type
>(-1); }
714 static _GLIBCXX_CONSTEXPR int_type
715 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
716 {
return eq_int_type(__c, eof()) ? 0 : __c; }
720_GLIBCXX_END_NAMESPACE_VERSION
723#if __cplusplus >= 201103L
725namespace std _GLIBCXX_VISIBILITY(default)
727_GLIBCXX_BEGIN_NAMESPACE_VERSION
730 struct char_traits<char16_t>
732 typedef char16_t char_type;
733#ifdef __UINT_LEAST16_TYPE__
734 typedef __UINT_LEAST16_TYPE__ int_type;
735#elif defined _GLIBCXX_USE_C99_STDINT_TR1
736 typedef uint_least16_t int_type;
738 typedef make_unsigned<char16_t>::type int_type;
742 typedef mbstate_t state_type;
743#if __cpp_lib_three_way_comparison
744 using comparison_category = strong_ordering;
747 static _GLIBCXX17_CONSTEXPR
void
748 assign(char_type& __c1,
const char_type& __c2)
noexcept
750#if __cpp_constexpr_dynamic_alloc
751 if (std::__is_constant_evaluated())
752 std::construct_at(__builtin_addressof(__c1), __c2);
758 static constexpr bool
759 eq(
const char_type& __c1,
const char_type& __c2)
noexcept
760 {
return __c1 == __c2; }
762 static constexpr bool
763 lt(
const char_type& __c1,
const char_type& __c2)
noexcept
764 {
return __c1 < __c2; }
766 static _GLIBCXX17_CONSTEXPR
int
767 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
769 for (
size_t __i = 0; __i < __n; ++__i)
770 if (lt(__s1[__i], __s2[__i]))
772 else if (lt(__s2[__i], __s1[__i]))
777 static _GLIBCXX17_CONSTEXPR
size_t
778 length(
const char_type* __s)
781 while (!eq(__s[__i], char_type()))
786 static _GLIBCXX17_CONSTEXPR
const char_type*
787 find(
const char_type* __s,
size_t __n,
const char_type& __a)
789 for (
size_t __i = 0; __i < __n; ++__i)
790 if (eq(__s[__i], __a))
795 static _GLIBCXX20_CONSTEXPR char_type*
796 move(char_type* __s1,
const char_type* __s2,
size_t __n)
800#if __cplusplus >= 202002L
801 if (std::__is_constant_evaluated())
804 return (
static_cast<char_type*
>
805 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type))));
808 static _GLIBCXX20_CONSTEXPR char_type*
809 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
813#if __cplusplus >= 202002L
814 if (std::__is_constant_evaluated())
817 return (
static_cast<char_type*
>
818 (__builtin_memcpy(__s1, __s2, __n *
sizeof(char_type))));
821 static _GLIBCXX20_CONSTEXPR char_type*
822 assign(char_type* __s,
size_t __n, char_type __a)
824 for (
size_t __i = 0; __i < __n; ++__i)
825 assign(__s[__i], __a);
829 static constexpr char_type
830 to_char_type(
const int_type& __c)
noexcept
831 {
return char_type(__c); }
833 static constexpr int_type
834 to_int_type(
const char_type& __c)
noexcept
835 {
return __c == eof() ? int_type(0xfffd) : int_type(__c); }
837 static constexpr bool
838 eq_int_type(
const int_type& __c1,
const int_type& __c2)
noexcept
839 {
return __c1 == __c2; }
841 static constexpr int_type
843 {
return static_cast<int_type
>(-1); }
845 static constexpr int_type
846 not_eof(
const int_type& __c)
noexcept
847 {
return eq_int_type(__c, eof()) ? 0 : __c; }
851 struct char_traits<char32_t>
853 typedef char32_t char_type;
854#ifdef __UINT_LEAST32_TYPE__
855 typedef __UINT_LEAST32_TYPE__ int_type;
856#elif defined _GLIBCXX_USE_C99_STDINT_TR1
857 typedef uint_least32_t int_type;
859 typedef make_unsigned<char32_t>::type int_type;
863 typedef mbstate_t state_type;
864#if __cpp_lib_three_way_comparison
865 using comparison_category = strong_ordering;
868 static _GLIBCXX17_CONSTEXPR
void
869 assign(char_type& __c1,
const char_type& __c2)
noexcept
871#if __cpp_constexpr_dynamic_alloc
872 if (std::__is_constant_evaluated())
873 std::construct_at(__builtin_addressof(__c1), __c2);
879 static constexpr bool
880 eq(
const char_type& __c1,
const char_type& __c2)
noexcept
881 {
return __c1 == __c2; }
883 static constexpr bool
884 lt(
const char_type& __c1,
const char_type& __c2)
noexcept
885 {
return __c1 < __c2; }
887 static _GLIBCXX17_CONSTEXPR
int
888 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
890 for (
size_t __i = 0; __i < __n; ++__i)
891 if (lt(__s1[__i], __s2[__i]))
893 else if (lt(__s2[__i], __s1[__i]))
898 static _GLIBCXX17_CONSTEXPR
size_t
899 length(
const char_type* __s)
902 while (!eq(__s[__i], char_type()))
907 static _GLIBCXX17_CONSTEXPR
const char_type*
908 find(
const char_type* __s,
size_t __n,
const char_type& __a)
910 for (
size_t __i = 0; __i < __n; ++__i)
911 if (eq(__s[__i], __a))
916 static _GLIBCXX20_CONSTEXPR char_type*
917 move(char_type* __s1,
const char_type* __s2,
size_t __n)
921#if __cplusplus >= 202002L
922 if (std::__is_constant_evaluated())
925 return (
static_cast<char_type*
>
926 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type))));
929 static _GLIBCXX20_CONSTEXPR char_type*
930 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
934#if __cplusplus >= 202002L
935 if (std::__is_constant_evaluated())
938 return (
static_cast<char_type*
>
939 (__builtin_memcpy(__s1, __s2, __n *
sizeof(char_type))));
942 static _GLIBCXX20_CONSTEXPR char_type*
943 assign(char_type* __s,
size_t __n, char_type __a)
945 for (
size_t __i = 0; __i < __n; ++__i)
946 assign(__s[__i], __a);
950 static constexpr char_type
951 to_char_type(
const int_type& __c)
noexcept
952 {
return char_type(__c); }
954 static constexpr int_type
955 to_int_type(
const char_type& __c)
noexcept
956 {
return int_type(__c); }
958 static constexpr bool
959 eq_int_type(
const int_type& __c1,
const int_type& __c2)
noexcept
960 {
return __c1 == __c2; }
962 static constexpr int_type
964 {
return static_cast<int_type
>(-1); }
966 static constexpr int_type
967 not_eof(
const int_type& __c)
noexcept
968 {
return eq_int_type(__c, eof()) ? 0 : __c; }
971#if __cpp_lib_three_way_comparison
974 template<
typename _ChTraits>
976 __char_traits_cmp_cat(
int __cmp)
noexcept
978 if constexpr (
requires {
typename _ChTraits::comparison_category; })
980 using _Cat =
typename _ChTraits::comparison_category;
981 static_assert( !is_void_v<common_comparison_category_t<_Cat>> );
982 return static_cast<_Cat
>(__cmp <=> 0);
985 return static_cast<weak_ordering
>(__cmp <=> 0);
990#pragma GCC diagnostic pop
992_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
fpos< mbstate_t > u32streampos
File position for char32_t streams.
long long streamoff
Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
fpos< mbstate_t > u16streampos
File position for char16_t streams.
GNU extensions for public use.
Mapping from character type to associated types.
Base class used to implement std::char_traits.
Basis for explicit traits specializations.
Class representing stream positions.