35#define _CHAR_TRAITS_H 1
37#pragma GCC system_header
41#if __cplusplus >= 201103L
44#if __cplusplus >= 202002L
49#ifndef _GLIBCXX_ALWAYS_INLINE
50# define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
53namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
55_GLIBCXX_BEGIN_NAMESPACE_VERSION
57#pragma GCC diagnostic push
58#pragma GCC diagnostic ignored "-Wstringop-overflow"
59#pragma GCC diagnostic ignored "-Wstringop-overread"
60#pragma GCC diagnostic ignored "-Warray-bounds"
72 template<
typename _CharT>
75 typedef unsigned long int_type;
78 typedef std::mbstate_t state_type;
97 template<
typename _CharT>
100 typedef _CharT char_type;
101 typedef typename _Char_types<_CharT>::int_type int_type;
103 typedef typename _Char_types<_CharT>::off_type off_type;
104 typedef typename _Char_types<_CharT>::state_type state_type;
105#if __cpp_lib_three_way_comparison
106 using comparison_category = std::strong_ordering;
109 static _GLIBCXX14_CONSTEXPR
void
110 assign(char_type& __c1,
const char_type& __c2)
112#if __cpp_constexpr_dynamic_alloc
113 if (std::__is_constant_evaluated())
114 std::construct_at(__builtin_addressof(__c1), __c2);
120 static _GLIBCXX_CONSTEXPR
bool
121 eq(
const char_type& __c1,
const char_type& __c2)
122 {
return __c1 == __c2; }
124 static _GLIBCXX_CONSTEXPR
bool
125 lt(
const char_type& __c1,
const char_type& __c2)
126 {
return __c1 < __c2; }
128 static _GLIBCXX14_CONSTEXPR
int
129 compare(
const char_type* __s1,
const char_type* __s2, std::size_t __n);
131 static _GLIBCXX14_CONSTEXPR std::size_t
132 length(
const char_type* __s);
134 static _GLIBCXX14_CONSTEXPR
const char_type*
135 find(
const char_type* __s, std::size_t __n,
const char_type& __a);
137 static _GLIBCXX20_CONSTEXPR char_type*
138 move(char_type* __s1,
const char_type* __s2, std::size_t __n);
140 static _GLIBCXX20_CONSTEXPR char_type*
141 copy(char_type* __s1,
const char_type* __s2, std::size_t __n);
143 static _GLIBCXX20_CONSTEXPR char_type*
144 assign(char_type* __s, std::size_t __n, char_type __a);
146 static _GLIBCXX_CONSTEXPR char_type
147 to_char_type(
const int_type& __c)
148 {
return static_cast<char_type
>(__c); }
150 static _GLIBCXX_CONSTEXPR int_type
151 to_int_type(
const char_type& __c)
152 {
return static_cast<int_type
>(__c); }
154 static _GLIBCXX_CONSTEXPR
bool
155 eq_int_type(
const int_type& __c1,
const int_type& __c2)
156 {
return __c1 == __c2; }
158 static _GLIBCXX_CONSTEXPR int_type
160 {
return static_cast<int_type
>(_GLIBCXX_STDIO_EOF); }
162 static _GLIBCXX_CONSTEXPR int_type
163 not_eof(
const int_type& __c)
164 {
return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
167 template<
typename _CharT>
168 _GLIBCXX14_CONSTEXPR
int
170 compare(
const char_type* __s1,
const char_type* __s2, std::size_t __n)
172 for (std::size_t __i = 0; __i < __n; ++__i)
173 if (lt(__s1[__i], __s2[__i]))
175 else if (lt(__s2[__i], __s1[__i]))
180 template<
typename _CharT>
181 _GLIBCXX14_CONSTEXPR std::size_t
182 char_traits<_CharT>::
183 length(
const char_type* __p)
186 while (!eq(__p[__i], char_type()))
191 template<
typename _CharT>
192 _GLIBCXX14_CONSTEXPR
const typename char_traits<_CharT>::char_type*
193 char_traits<_CharT>::
194 find(
const char_type* __s, std::size_t __n,
const char_type& __a)
196 for (std::size_t __i = 0; __i < __n; ++__i)
197 if (eq(__s[__i], __a))
202 template<
typename _CharT>
204 typename char_traits<_CharT>::char_type*
205 char_traits<_CharT>::
206 move(char_type* __s1,
const char_type* __s2, std::size_t __n)
210#if __cplusplus >= 202002L
211 if (std::__is_constant_evaluated())
215#if __cpp_constexpr_dynamic_alloc
218 char_type* __tmp =
new char_type[__n];
219 copy(__tmp, __s2, __n);
220 copy(__s1, __tmp, __n);
223 const auto __end = __s2 + __n - 1;
224 bool __overlap =
false;
225 for (std::size_t __i = 0; __i < __n - 1; ++__i)
227 if (__s1 + __i == __end)
238 assign(__s1[__n], __s2[__n]);
243 copy(__s1, __s2, __n);
248 __builtin_memmove(__s1, __s2, __n *
sizeof(char_type));
252 template<
typename _CharT>
254 typename char_traits<_CharT>::char_type*
255 char_traits<_CharT>::
256 copy(char_type* __s1,
const char_type* __s2, std::size_t __n)
260#if __cplusplus >= 202002L
261 if (std::__is_constant_evaluated())
263 for (std::size_t __i = 0; __i < __n; ++__i)
264 std::construct_at(__s1 + __i, __s2[__i]);
268 __builtin_memcpy(__s1, __s2, __n *
sizeof(char_type));
272 template<
typename _CharT>
274 typename char_traits<_CharT>::char_type*
275 char_traits<_CharT>::
276 assign(char_type* __s, std::size_t __n, char_type __a)
278#if __cplusplus >= 202002L
279 if (std::__is_constant_evaluated())
281 for (std::size_t __i = 0; __i < __n; ++__i)
282 std::construct_at(__s + __i, __a);
287 if _GLIBCXX17_CONSTEXPR (
sizeof(_CharT) == 1 && __is_trivial(_CharT))
292 __builtin_memcpy(&__c, __builtin_addressof(__a), 1);
293 __builtin_memset(__s, __c, __n);
298 for (std::size_t __i = 0; __i < __n; ++__i)
304_GLIBCXX_END_NAMESPACE_VERSION
307namespace std _GLIBCXX_VISIBILITY(default)
309_GLIBCXX_BEGIN_NAMESPACE_VERSION
311#ifdef __cpp_lib_is_constant_evaluated
313# define __cpp_lib_constexpr_char_traits 201811L
314#elif __cplusplus >= 201703L && _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
316# define __cpp_lib_constexpr_char_traits 201611L
332 template<
typename _CharT>
341 typedef char char_type;
342 typedef int int_type;
345 typedef mbstate_t state_type;
346#if __cpp_lib_three_way_comparison
347 using comparison_category = strong_ordering;
350 static _GLIBCXX17_CONSTEXPR
void
351 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
353#if __cpp_constexpr_dynamic_alloc
354 if (std::__is_constant_evaluated())
355 std::construct_at(__builtin_addressof(__c1), __c2);
361 static _GLIBCXX_CONSTEXPR
bool
362 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
363 {
return __c1 == __c2; }
365 static _GLIBCXX_CONSTEXPR
bool
366 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
369 return (
static_cast<unsigned char>(__c1)
370 <
static_cast<unsigned char>(__c2));
373 static _GLIBCXX17_CONSTEXPR
int
374 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
378#if __cplusplus >= 201703L
379 if (std::__is_constant_evaluated())
381 for (
size_t __i = 0; __i < __n; ++__i)
382 if (lt(__s1[__i], __s2[__i]))
384 else if (lt(__s2[__i], __s1[__i]))
389 return __builtin_memcmp(__s1, __s2, __n);
392 static _GLIBCXX17_CONSTEXPR
size_t
393 length(
const char_type* __s)
395#if __cplusplus >= 201703L
396 if (std::__is_constant_evaluated())
399 return __builtin_strlen(__s);
402 static _GLIBCXX17_CONSTEXPR
const char_type*
403 find(
const char_type* __s,
size_t __n,
const char_type& __a)
407#if __cplusplus >= 201703L
408 if (std::__is_constant_evaluated())
411 return static_cast<const char_type*
>(__builtin_memchr(__s, __a, __n));
414 static _GLIBCXX20_CONSTEXPR char_type*
415 move(char_type* __s1,
const char_type* __s2,
size_t __n)
419#if __cplusplus >= 202002L
420 if (std::__is_constant_evaluated())
423 return static_cast<char_type*
>(__builtin_memmove(__s1, __s2, __n));
426 static _GLIBCXX20_CONSTEXPR char_type*
427 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
431#if __cplusplus >= 202002L
432 if (std::__is_constant_evaluated())
435 return static_cast<char_type*
>(__builtin_memcpy(__s1, __s2, __n));
438 static _GLIBCXX20_CONSTEXPR char_type*
439 assign(char_type* __s,
size_t __n, char_type __a)
443#if __cplusplus >= 202002L
444 if (std::__is_constant_evaluated())
447 return static_cast<char_type*
>(__builtin_memset(__s, __a, __n));
450 static _GLIBCXX_CONSTEXPR char_type
451 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
452 {
return static_cast<char_type
>(__c); }
456 static _GLIBCXX_CONSTEXPR int_type
457 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
458 {
return static_cast<int_type
>(
static_cast<unsigned char>(__c)); }
460 static _GLIBCXX_CONSTEXPR
bool
461 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
462 {
return __c1 == __c2; }
464 static _GLIBCXX_CONSTEXPR int_type
465 eof() _GLIBCXX_NOEXCEPT
466 {
return static_cast<int_type
>(_GLIBCXX_STDIO_EOF); }
468 static _GLIBCXX_CONSTEXPR int_type
469 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
470 {
return (__c == eof()) ? 0 : __c; }
474#ifdef _GLIBCXX_USE_WCHAR_T
479 typedef wchar_t char_type;
480 typedef wint_t int_type;
483 typedef mbstate_t state_type;
484#if __cpp_lib_three_way_comparison
485 using comparison_category = strong_ordering;
488 static _GLIBCXX17_CONSTEXPR
void
489 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
491#if __cpp_constexpr_dynamic_alloc
492 if (std::__is_constant_evaluated())
493 std::construct_at(__builtin_addressof(__c1), __c2);
499 static _GLIBCXX_CONSTEXPR
bool
500 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
501 {
return __c1 == __c2; }
503 static _GLIBCXX_CONSTEXPR
bool
504 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
505 {
return __c1 < __c2; }
507 static _GLIBCXX17_CONSTEXPR
int
508 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
512#if __cplusplus >= 201703L
513 if (std::__is_constant_evaluated())
516 return wmemcmp(__s1, __s2, __n);
519 static _GLIBCXX17_CONSTEXPR
size_t
520 length(
const char_type* __s)
522#if __cplusplus >= 201703L
523 if (std::__is_constant_evaluated())
529 static _GLIBCXX17_CONSTEXPR
const char_type*
530 find(
const char_type* __s,
size_t __n,
const char_type& __a)
534#if __cplusplus >= 201703L
535 if (std::__is_constant_evaluated())
538 return wmemchr(__s, __a, __n);
541 static _GLIBCXX20_CONSTEXPR char_type*
542 move(char_type* __s1,
const char_type* __s2,
size_t __n)
546#if __cplusplus >= 202002L
547 if (std::__is_constant_evaluated())
550 return wmemmove(__s1, __s2, __n);
553 static _GLIBCXX20_CONSTEXPR char_type*
554 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
558#if __cplusplus >= 202002L
559 if (std::__is_constant_evaluated())
562 return wmemcpy(__s1, __s2, __n);
565 static _GLIBCXX20_CONSTEXPR char_type*
566 assign(char_type* __s,
size_t __n, char_type __a)
570#if __cplusplus >= 202002L
571 if (std::__is_constant_evaluated())
574 return wmemset(__s, __a, __n);
577 static _GLIBCXX_CONSTEXPR char_type
578 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
579 {
return char_type(__c); }
581 static _GLIBCXX_CONSTEXPR int_type
582 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
583 {
return int_type(__c); }
585 static _GLIBCXX_CONSTEXPR
bool
586 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
587 {
return __c1 == __c2; }
589 static _GLIBCXX_CONSTEXPR int_type
590 eof() _GLIBCXX_NOEXCEPT
591 {
return static_cast<int_type
>(WEOF); }
593 static _GLIBCXX_CONSTEXPR int_type
594 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
595 {
return eq_int_type(__c, eof()) ? 0 : __c; }
603#ifdef _GLIBCXX_USE_CHAR8_T
605 struct char_traits<char8_t>
607 typedef char8_t char_type;
608 typedef unsigned int int_type;
609 typedef u8streampos pos_type;
611 typedef mbstate_t state_type;
612#if __cpp_lib_three_way_comparison
613 using comparison_category = strong_ordering;
616 static _GLIBCXX17_CONSTEXPR
void
617 assign(char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
619#if __cpp_constexpr_dynamic_alloc
620 if (std::__is_constant_evaluated())
621 std::construct_at(__builtin_addressof(__c1), __c2);
627 static _GLIBCXX_CONSTEXPR
bool
628 eq(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
629 {
return __c1 == __c2; }
631 static _GLIBCXX_CONSTEXPR
bool
632 lt(
const char_type& __c1,
const char_type& __c2) _GLIBCXX_NOEXCEPT
633 {
return __c1 < __c2; }
635 static _GLIBCXX17_CONSTEXPR
int
636 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
640#if __cplusplus >= 201703L
641 if (std::__is_constant_evaluated())
644 return __builtin_memcmp(__s1, __s2, __n);
647 static _GLIBCXX17_CONSTEXPR
size_t
648 length(
const char_type* __s)
650#if __cplusplus >= 201703L
651 if (std::__is_constant_evaluated())
655 while (!eq(__s[__i], char_type()))
660 static _GLIBCXX17_CONSTEXPR
const char_type*
661 find(
const char_type* __s,
size_t __n,
const char_type& __a)
665#if __cplusplus >= 201703L
666 if (std::__is_constant_evaluated())
669 return static_cast<const char_type*
>(__builtin_memchr(__s, __a, __n));
672 static _GLIBCXX20_CONSTEXPR char_type*
673 move(char_type* __s1,
const char_type* __s2,
size_t __n)
677#if __cplusplus >= 202002L
678 if (std::__is_constant_evaluated())
681 return static_cast<char_type*
>(__builtin_memmove(__s1, __s2, __n));
684 static _GLIBCXX20_CONSTEXPR char_type*
685 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
689#if __cplusplus >= 202002L
690 if (std::__is_constant_evaluated())
693 return static_cast<char_type*
>(__builtin_memcpy(__s1, __s2, __n));
696 static _GLIBCXX20_CONSTEXPR char_type*
697 assign(char_type* __s,
size_t __n, char_type __a)
701#if __cplusplus >= 202002L
702 if (std::__is_constant_evaluated())
705 return static_cast<char_type*
>(__builtin_memset(__s, __a, __n));
708 static _GLIBCXX_CONSTEXPR char_type
709 to_char_type(
const int_type& __c) _GLIBCXX_NOEXCEPT
710 {
return char_type(__c); }
712 static _GLIBCXX_CONSTEXPR int_type
713 to_int_type(
const char_type& __c) _GLIBCXX_NOEXCEPT
714 {
return int_type(__c); }
716 static _GLIBCXX_CONSTEXPR
bool
717 eq_int_type(
const int_type& __c1,
const int_type& __c2) _GLIBCXX_NOEXCEPT
718 {
return __c1 == __c2; }
720 static _GLIBCXX_CONSTEXPR int_type
721 eof() _GLIBCXX_NOEXCEPT
722 {
return static_cast<int_type
>(-1); }
724 static _GLIBCXX_CONSTEXPR int_type
725 not_eof(
const int_type& __c) _GLIBCXX_NOEXCEPT
726 {
return eq_int_type(__c, eof()) ? 0 : __c; }
730_GLIBCXX_END_NAMESPACE_VERSION
733#if __cplusplus >= 201103L
737namespace std _GLIBCXX_VISIBILITY(default)
739_GLIBCXX_BEGIN_NAMESPACE_VERSION
742 struct char_traits<char16_t>
744 typedef char16_t char_type;
745#ifdef _GLIBCXX_USE_C99_STDINT_TR1
746 typedef uint_least16_t int_type;
747#elif defined __UINT_LEAST16_TYPE__
748 typedef __UINT_LEAST16_TYPE__ int_type;
750 typedef make_unsigned<char16_t>::type int_type;
754 typedef mbstate_t state_type;
755#if __cpp_lib_three_way_comparison
756 using comparison_category = strong_ordering;
759 static _GLIBCXX17_CONSTEXPR
void
760 assign(char_type& __c1,
const char_type& __c2)
noexcept
762#if __cpp_constexpr_dynamic_alloc
763 if (std::__is_constant_evaluated())
764 std::construct_at(__builtin_addressof(__c1), __c2);
770 static constexpr bool
771 eq(
const char_type& __c1,
const char_type& __c2)
noexcept
772 {
return __c1 == __c2; }
774 static constexpr bool
775 lt(
const char_type& __c1,
const char_type& __c2)
noexcept
776 {
return __c1 < __c2; }
778 static _GLIBCXX17_CONSTEXPR
int
779 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
781 for (
size_t __i = 0; __i < __n; ++__i)
782 if (lt(__s1[__i], __s2[__i]))
784 else if (lt(__s2[__i], __s1[__i]))
789 static _GLIBCXX17_CONSTEXPR
size_t
790 length(
const char_type* __s)
793 while (!eq(__s[__i], char_type()))
798 static _GLIBCXX17_CONSTEXPR
const char_type*
799 find(
const char_type* __s,
size_t __n,
const char_type& __a)
801 for (
size_t __i = 0; __i < __n; ++__i)
802 if (eq(__s[__i], __a))
807 static _GLIBCXX20_CONSTEXPR char_type*
808 move(char_type* __s1,
const char_type* __s2,
size_t __n)
812#if __cplusplus >= 202002L
813 if (std::__is_constant_evaluated())
816 return (
static_cast<char_type*
>
817 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type))));
820 static _GLIBCXX20_CONSTEXPR char_type*
821 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
825#if __cplusplus >= 202002L
826 if (std::__is_constant_evaluated())
829 return (
static_cast<char_type*
>
830 (__builtin_memcpy(__s1, __s2, __n *
sizeof(char_type))));
833 static _GLIBCXX20_CONSTEXPR char_type*
834 assign(char_type* __s,
size_t __n, char_type __a)
836 for (
size_t __i = 0; __i < __n; ++__i)
837 assign(__s[__i], __a);
841 static constexpr char_type
842 to_char_type(
const int_type& __c)
noexcept
843 {
return char_type(__c); }
845 static constexpr int_type
846 to_int_type(
const char_type& __c)
noexcept
847 {
return __c == eof() ? int_type(0xfffd) : int_type(__c); }
849 static constexpr bool
850 eq_int_type(
const int_type& __c1,
const int_type& __c2)
noexcept
851 {
return __c1 == __c2; }
853 static constexpr int_type
855 {
return static_cast<int_type
>(-1); }
857 static constexpr int_type
858 not_eof(
const int_type& __c)
noexcept
859 {
return eq_int_type(__c, eof()) ? 0 : __c; }
863 struct char_traits<char32_t>
865 typedef char32_t char_type;
866#ifdef _GLIBCXX_USE_C99_STDINT_TR1
867 typedef uint_least32_t int_type;
868#elif defined __UINT_LEAST32_TYPE__
869 typedef __UINT_LEAST32_TYPE__ int_type;
871 typedef make_unsigned<char32_t>::type int_type;
875 typedef mbstate_t state_type;
876#if __cpp_lib_three_way_comparison
877 using comparison_category = strong_ordering;
880 static _GLIBCXX17_CONSTEXPR
void
881 assign(char_type& __c1,
const char_type& __c2)
noexcept
883#if __cpp_constexpr_dynamic_alloc
884 if (std::__is_constant_evaluated())
885 std::construct_at(__builtin_addressof(__c1), __c2);
891 static constexpr bool
892 eq(
const char_type& __c1,
const char_type& __c2)
noexcept
893 {
return __c1 == __c2; }
895 static constexpr bool
896 lt(
const char_type& __c1,
const char_type& __c2)
noexcept
897 {
return __c1 < __c2; }
899 static _GLIBCXX17_CONSTEXPR
int
900 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
902 for (
size_t __i = 0; __i < __n; ++__i)
903 if (lt(__s1[__i], __s2[__i]))
905 else if (lt(__s2[__i], __s1[__i]))
910 static _GLIBCXX17_CONSTEXPR
size_t
911 length(
const char_type* __s)
914 while (!eq(__s[__i], char_type()))
919 static _GLIBCXX17_CONSTEXPR
const char_type*
920 find(
const char_type* __s,
size_t __n,
const char_type& __a)
922 for (
size_t __i = 0; __i < __n; ++__i)
923 if (eq(__s[__i], __a))
928 static _GLIBCXX20_CONSTEXPR char_type*
929 move(char_type* __s1,
const char_type* __s2,
size_t __n)
933#if __cplusplus >= 202002L
934 if (std::__is_constant_evaluated())
937 return (
static_cast<char_type*
>
938 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type))));
941 static _GLIBCXX20_CONSTEXPR char_type*
942 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
946#if __cplusplus >= 202002L
947 if (std::__is_constant_evaluated())
950 return (
static_cast<char_type*
>
951 (__builtin_memcpy(__s1, __s2, __n *
sizeof(char_type))));
954 static _GLIBCXX20_CONSTEXPR char_type*
955 assign(char_type* __s,
size_t __n, char_type __a)
957 for (
size_t __i = 0; __i < __n; ++__i)
958 assign(__s[__i], __a);
962 static constexpr char_type
963 to_char_type(
const int_type& __c)
noexcept
964 {
return char_type(__c); }
966 static constexpr int_type
967 to_int_type(
const char_type& __c)
noexcept
968 {
return int_type(__c); }
970 static constexpr bool
971 eq_int_type(
const int_type& __c1,
const int_type& __c2)
noexcept
972 {
return __c1 == __c2; }
974 static constexpr int_type
976 {
return static_cast<int_type
>(-1); }
978 static constexpr int_type
979 not_eof(
const int_type& __c)
noexcept
980 {
return eq_int_type(__c, eof()) ? 0 : __c; }
983#if __cpp_lib_three_way_comparison
986 template<
typename _ChTraits>
988 __char_traits_cmp_cat(
int __cmp)
noexcept
990 if constexpr (
requires {
typename _ChTraits::comparison_category; })
992 using _Cat =
typename _ChTraits::comparison_category;
993 static_assert( !is_void_v<common_comparison_category_t<_Cat>> );
994 return static_cast<_Cat
>(__cmp <=> 0);
997 return static_cast<weak_ordering
>(__cmp <=> 0);
1002#pragma GCC diagnostic pop
1004_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.