29#ifndef _GLIBCXX_DEBUG_STRING
30#define _GLIBCXX_DEBUG_STRING 1
32#pragma GCC system_header
39#define _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_Cond,_File,_Line,_Func) \
41 __gnu_debug::_Error_formatter::_S_at(_File, _Line, _Func) \
42 ._M_message(#_Cond)._M_error()
44#if _GLIBCXX_USE_CXX11_ABI && __cplusplus >= 201103
45# define _GLIBCXX_INSERT_RETURNS_ITERATOR 1
46# define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr) expr
48# define _GLIBCXX_INSERT_RETURNS_ITERATOR 0
49# define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr)
52#ifdef _GLIBCXX_DEBUG_PEDANTIC
53# if __cplusplus < 201103L
54# define __glibcxx_check_string(_String) \
55 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0, \
58# define __glibcxx_check_string_len(_String,_Len) \
59 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0 || _Len == 0, \
63# define __glibcxx_check_string(_String) \
64 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != nullptr, \
67# define __glibcxx_check_string_len(_String,_Len) \
68 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != nullptr || _Len == 0, \
73# define __glibcxx_check_string(_String)
74# define __glibcxx_check_string_len(_String,_Len)
80 template<
typename _CharT,
typename _Integer>
83 _Integer __n __attribute__((__unused__)),
84 const char* __file __attribute__((__unused__)),
85 unsigned int __line __attribute__((__unused__)),
86 const char* __function __attribute__((__unused__)))
88#ifdef _GLIBCXX_DEBUG_PEDANTIC
89# if __cplusplus < 201103L
90 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0 || __n == 0,
91 __file, __line, __function);
93 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s !=
nullptr || __n == 0,
94 __file, __line, __function);
101 template<
typename _CharT>
104 const char* __file __attribute__((__unused__)),
105 unsigned int __line __attribute__((__unused__)),
106 const char* __function __attribute__((__unused__)))
108#ifdef _GLIBCXX_DEBUG_PEDANTIC
109# if __cplusplus < 201103L
110 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0,
111 __file, __line, __function);
113 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s !=
nullptr,
114 __file, __line, __function);
120#define __glibcxx_check_string_n_constructor(_Str, _Size) \
121 __check_string(_Str, _Size, __FILE__, __LINE__, __PRETTY_FUNCTION__)
123#define __glibcxx_check_string_constructor(_Str) \
124 __check_string(_Str, __FILE__, __LINE__, __PRETTY_FUNCTION__)
127 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
128 typename _Allocator = std::allocator<_CharT> >
131 basic_string<_CharT, _Traits, _Allocator>,
132 _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>,
140 template<
typename _ItT,
typename _SeqT,
typename _CatT>
141 friend class ::__gnu_debug::_Safe_iterator;
149 typedef _Traits traits_type;
150 typedef typename _Traits::char_type value_type;
151 typedef _Allocator allocator_type;
152 typedef typename _Base::size_type size_type;
153 typedef typename _Base::difference_type difference_type;
154 typedef typename _Base::reference reference;
155 typedef typename _Base::const_reference const_reference;
156 typedef typename _Base::pointer pointer;
157 typedef typename _Base::const_pointer const_pointer;
175#if __cplusplus < 201103L
188 const _Allocator& __a = _Allocator())
193 :
_Base(__s, __a) { }
217 const _Allocator& __a = _Allocator())
218 :
_Base(__str, __pos, __n, __a) { }
221 const _Allocator& __a = _Allocator())
222 :
_Base(__glibcxx_check_string_n_constructor(__s, __n), __n, __a) { }
224 basic_string(
const _CharT* __s,
const _Allocator& __a = _Allocator())
225 :
_Base(__glibcxx_check_string_constructor(__s), __a)
229 const _Allocator& __a = _Allocator())
230 :
_Base(__n, __c, __a) { }
232 template<
typename _InputIterator>
233 basic_string(_InputIterator __begin, _InputIterator __end,
234 const _Allocator& __a = _Allocator())
236 __glibcxx_check_valid_constructor_range(__begin, __end)),
239#if __cplusplus >= 201103L
248 operator=(
const _CharT* __s)
250 __glibcxx_check_string(__s);
252 this->_M_invalidate_all();
257 operator=(_CharT __c)
260 this->_M_invalidate_all();
264#if __cplusplus >= 201103L
269 this->_M_invalidate_all();
280 begin()
const _GLIBCXX_NOEXCEPT
288 end()
const _GLIBCXX_NOEXCEPT
296 rbegin()
const _GLIBCXX_NOEXCEPT
304 rend()
const _GLIBCXX_NOEXCEPT
307#if __cplusplus >= 201103L
309 cbegin()
const noexcept
313 cend()
const noexcept
317 crbegin()
const noexcept
321 crend()
const noexcept
331 resize(size_type __n, _CharT __c)
334 this->_M_invalidate_all();
338 resize(size_type __n)
339 { this->resize(__n, _CharT()); }
341#if __cplusplus >= 201103L
343 shrink_to_fit()
noexcept
350 this->_M_invalidate_all();
365 this->_M_invalidate_all();
372 operator[](size_type __pos)
const _GLIBCXX_NOEXCEPT
374 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
375 _M_message(__gnu_debug::__msg_subscript_oob)
376 ._M_sequence(*
this,
"this")
377 ._M_integer(__pos,
"__pos")
378 ._M_integer(this->
size(),
"size"));
383 operator[](size_type __pos)
385#if __cplusplus < 201103L && defined(_GLIBCXX_DEBUG_PEDANTIC)
386 __glibcxx_check_subscript(__pos);
389 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
390 _M_message(__gnu_debug::__msg_subscript_oob)
391 ._M_sequence(*
this,
"this")
392 ._M_integer(__pos,
"__pos")
393 ._M_integer(this->
size(),
"size"));
400#if __cplusplus >= 201103L
410 this->_M_invalidate_all();
415 operator+=(
const _CharT* __s)
417 __glibcxx_check_string(__s);
419 this->_M_invalidate_all();
424 operator+=(_CharT __c)
427 this->_M_invalidate_all();
431#if __cplusplus >= 201103L
436 this->_M_invalidate_all();
445 this->_M_invalidate_all();
450 append(
const basic_string& __str, size_type __pos, size_type __n)
453 this->_M_invalidate_all();
458 append(
const _CharT* __s, size_type __n)
460 __glibcxx_check_string_len(__s, __n);
462 this->_M_invalidate_all();
467 append(
const _CharT* __s)
469 __glibcxx_check_string(__s);
471 this->_M_invalidate_all();
476 append(size_type __n, _CharT __c)
479 this->_M_invalidate_all();
483 template<
typename _InputIterator>
485 append(_InputIterator __first, _InputIterator __last)
488 __glibcxx_check_valid_range2(__first, __last, __dist);
490 if (__dist.
second >= __dp_sign)
492 __gnu_debug::__unsafe(__last));
496 this->_M_invalidate_all();
503 push_back(_CharT __c)
506 this->_M_invalidate_all();
513 this->_M_invalidate_all();
517#if __cplusplus >= 201103L
520 noexcept(
noexcept(std::declval<_Base&>().assign(
std::move(__x))))
523 this->_M_invalidate_all();
529 assign(
const basic_string& __str, size_type __pos, size_type __n)
532 this->_M_invalidate_all();
537 assign(
const _CharT* __s, size_type __n)
539 __glibcxx_check_string_len(__s, __n);
541 this->_M_invalidate_all();
546 assign(
const _CharT* __s)
548 __glibcxx_check_string(__s);
550 this->_M_invalidate_all();
555 assign(size_type __n, _CharT __c)
558 this->_M_invalidate_all();
562 template<
typename _InputIterator>
564 assign(_InputIterator __first, _InputIterator __last)
567 __glibcxx_check_valid_range2(__first, __last, __dist);
569 if (__dist.
second >= __dp_sign)
571 __gnu_debug::__unsafe(__last));
575 this->_M_invalidate_all();
579#if __cplusplus >= 201103L
584 this->_M_invalidate_all();
593 this->_M_invalidate_all();
599 size_type __pos2, size_type __n)
602 this->_M_invalidate_all();
607 insert(size_type __pos,
const _CharT* __s, size_type __n)
609 __glibcxx_check_string(__s);
611 this->_M_invalidate_all();
616 insert(size_type __pos,
const _CharT* __s)
618 __glibcxx_check_string(__s);
620 this->_M_invalidate_all();
625 insert(size_type __pos, size_type __n, _CharT __c)
628 this->_M_invalidate_all();
637 this->_M_invalidate_all();
641#if __cplusplus >= 201103L
646#if _GLIBCXX_USE_CXX11_ABI
651 typename _Base::iterator __res =
_Base::begin() + __offset;
653 this->_M_invalidate_all();
658 insert(
iterator __p, size_type __n, _CharT __c)
662 this->_M_invalidate_all();
666 template<
typename _InputIterator>
669 _InputIterator __first, _InputIterator __last)
674 typename _Base::iterator __res;
675#if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
678 if (__dist.
second >= __dp_sign)
680 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
682 __gnu_debug::__unsafe(__last));
686 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
690#if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
693 this->_M_invalidate_all();
697#if __cplusplus >= 201103L
702#if _GLIBCXX_USE_CXX11_ABI
709 this->_M_invalidate_all();
715 erase(size_type __pos = 0, size_type __n =
_Base::npos)
718 this->_M_invalidate_all();
727 this->_M_invalidate_all();
737 typename _Base::iterator __res =
_Base::erase(__first.base(),
739 this->_M_invalidate_all();
743#if __cplusplus >= 201103L
747 __glibcxx_check_nonempty();
749 this->_M_invalidate_all();
754 replace(size_type __pos1, size_type __n1,
const basic_string& __str)
757 this->_M_invalidate_all();
762 replace(size_type __pos1, size_type __n1,
const basic_string& __str,
763 size_type __pos2, size_type __n2)
766 this->_M_invalidate_all();
771 replace(size_type __pos, size_type __n1,
const _CharT* __s,
774 __glibcxx_check_string_len(__s, __n2);
776 this->_M_invalidate_all();
781 replace(size_type __pos, size_type __n1,
const _CharT* __s)
783 __glibcxx_check_string(__s);
785 this->_M_invalidate_all();
790 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
793 this->_M_invalidate_all();
803 this->_M_invalidate_all();
809 const _CharT* __s, size_type __n)
812 __glibcxx_check_string_len(__s, __n);
814 this->_M_invalidate_all();
823 __glibcxx_check_string(__s);
825 this->_M_invalidate_all();
831 size_type __n, _CharT __c)
835 this->_M_invalidate_all();
839 template<
typename _InputIterator>
842 _InputIterator __j1, _InputIterator __j2)
847 __glibcxx_check_valid_range2(__j1, __j2, __dist);
849 if (__dist.
second >= __dp_sign)
851 __gnu_debug::__unsafe(__j1),
852 __gnu_debug::__unsafe(__j2));
856 this->_M_invalidate_all();
860#if __cplusplus >= 201103L
867 this->_M_invalidate_all();
873 copy(_CharT* __s, size_type __n, size_type __pos = 0)
const
875 __glibcxx_check_string_len(__s, __n);
881 _GLIBCXX_NOEXCEPT_IF(std::__is_nothrow_swappable<_Base>::value)
889 c_str()
const _GLIBCXX_NOEXCEPT
892 this->_M_invalidate_all();
897 data()
const _GLIBCXX_NOEXCEPT
900 this->_M_invalidate_all();
910 find(
const _CharT* __s, size_type __pos, size_type __n)
const
913 __glibcxx_check_string(__s);
919 find(
const _CharT* __s, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
921 __glibcxx_check_string(__s);
929 rfind(
const _CharT* __s, size_type __pos, size_type __n)
const
931 __glibcxx_check_string_len(__s, __n);
937 rfind(
const _CharT* __s, size_type __pos =
_Base::npos)
const
939 __glibcxx_check_string(__s);
947 find_first_of(
const _CharT* __s, size_type __pos, size_type __n)
const
950 __glibcxx_check_string(__s);
956 find_first_of(
const _CharT* __s, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
958 __glibcxx_check_string(__s);
966 find_last_of(
const _CharT* __s, size_type __pos, size_type __n)
const
969 __glibcxx_check_string(__s);
975 find_last_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
978 __glibcxx_check_string(__s);
986 find_first_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
989 __glibcxx_check_string_len(__s, __n);
995 find_first_not_of(
const _CharT* __s, size_type __pos = 0)
const
998 __glibcxx_check_string(__s);
1004 _GLIBCXX20_CONSTEXPR
1006 find_last_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
1009 __glibcxx_check_string(__s);
1013 _GLIBCXX20_CONSTEXPR
1015 find_last_not_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
1018 __glibcxx_check_string(__s);
1023 substr(size_type __pos = 0, size_type __n =
_Base::npos)
const
1028 _GLIBCXX20_CONSTEXPR
1030 compare(
const _CharT* __s)
const _GLIBCXX_NOEXCEPT
1032 __glibcxx_check_string(__s);
1038 _GLIBCXX20_CONSTEXPR
1040 compare(size_type __pos1, size_type __n1,
const _CharT* __s)
const
1042 __glibcxx_check_string(__s);
1048 _GLIBCXX20_CONSTEXPR
1050 compare(size_type __pos1, size_type __n1,
const _CharT* __s,
1051 size_type __n2)
const
1053 __glibcxx_check_string_len(__s, __n2);
1058 _M_base() _GLIBCXX_NOEXCEPT {
return *
this; }
1061 _M_base()
const _GLIBCXX_NOEXCEPT {
return *
this; }
1063 using _Safe::_M_invalidate_all;
1066 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1072 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1073 inline basic_string<_CharT,_Traits,_Allocator>
1074 operator+(
const _CharT* __lhs,
1075 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1077 __glibcxx_check_string(__lhs);
1078 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1081 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1082 inline basic_string<_CharT,_Traits,_Allocator>
1084 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1085 {
return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
1087 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1088 inline basic_string<_CharT,_Traits,_Allocator>
1089 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1090 const _CharT* __rhs)
1092 __glibcxx_check_string(__rhs);
1093 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1096 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1097 inline basic_string<_CharT,_Traits,_Allocator>
1098 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1100 {
return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
1102 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1104 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1105 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1106 {
return __lhs._M_base() == __rhs._M_base(); }
1108 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1110 operator==(
const _CharT* __lhs,
1111 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1113 __glibcxx_check_string(__lhs);
1114 return __lhs == __rhs._M_base();
1117 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1119 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1120 const _CharT* __rhs)
1122 __glibcxx_check_string(__rhs);
1123 return __lhs._M_base() == __rhs;
1126 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1128 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1129 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1130 {
return __lhs._M_base() != __rhs._M_base(); }
1132 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1134 operator!=(
const _CharT* __lhs,
1135 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1137 __glibcxx_check_string(__lhs);
1138 return __lhs != __rhs._M_base();
1141 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1143 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1144 const _CharT* __rhs)
1146 __glibcxx_check_string(__rhs);
1147 return __lhs._M_base() != __rhs;
1150 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1152 operator<(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1153 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1154 {
return __lhs._M_base() < __rhs._M_base(); }
1156 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1159 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1161 __glibcxx_check_string(__lhs);
1162 return __lhs < __rhs._M_base();
1165 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1167 operator<(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1168 const _CharT* __rhs)
1170 __glibcxx_check_string(__rhs);
1171 return __lhs._M_base() < __rhs;
1174 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1176 operator<=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1177 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1178 {
return __lhs._M_base() <= __rhs._M_base(); }
1180 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1183 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1185 __glibcxx_check_string(__lhs);
1186 return __lhs <= __rhs._M_base();
1189 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1191 operator<=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1192 const _CharT* __rhs)
1194 __glibcxx_check_string(__rhs);
1195 return __lhs._M_base() <= __rhs;
1198 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1200 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1201 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1202 {
return __lhs._M_base() >= __rhs._M_base(); }
1204 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1207 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1209 __glibcxx_check_string(__lhs);
1210 return __lhs >= __rhs._M_base();
1213 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1215 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1216 const _CharT* __rhs)
1218 __glibcxx_check_string(__rhs);
1219 return __lhs._M_base() >= __rhs;
1222 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1224 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1225 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1226 {
return __lhs._M_base() > __rhs._M_base(); }
1228 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1231 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1233 __glibcxx_check_string(__lhs);
1234 return __lhs > __rhs._M_base();
1237 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1239 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1240 const _CharT* __rhs)
1242 __glibcxx_check_string(__rhs);
1243 return __lhs._M_base() > __rhs;
1247 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1249 swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
1250 basic_string<_CharT,_Traits,_Allocator>& __rhs)
1251 { __lhs.swap(__rhs); }
1253 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1256 const basic_string<_CharT, _Traits, _Allocator>& __str)
1257 {
return __os << __str._M_base(); }
1259 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1262 basic_string<_CharT,_Traits,_Allocator>& __str)
1265 __str._M_invalidate_all();
1269 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1272 basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
1277 __str._M_invalidate_all();
1281 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1284 basic_string<_CharT,_Traits,_Allocator>& __str)
1288 __str._M_invalidate_all();
1292 typedef basic_string<char>
string;
1294 typedef basic_string<wchar_t>
wstring;
1296#ifdef _GLIBCXX_USE_CHAR8_T
1298 typedef basic_string<char8_t> u8string;
1301#if __cplusplus >= 201103L
1309 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1310 struct _Insert_range_from_self_is_safe<
1312 {
enum { __value = 1 }; };
1316#if __cplusplus >= 201103L
1317namespace std _GLIBCXX_VISIBILITY(default)
1319_GLIBCXX_BEGIN_NAMESPACE_VERSION
1322 template<
typename _CharT>
1324 :
public hash<std::basic_string<_CharT>>
1327 template<
typename _CharT>
1332_GLIBCXX_END_NAMESPACE_VERSION
1336#undef _GLIBCXX_INSERT_RETURNS_ITERATOR
1337#undef _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY
#define __glibcxx_check_insert(_Position)
#define __glibcxx_check_erase_range(_First, _Last)
#define __glibcxx_check_erase(_Position)
#define __glibcxx_check_insert_range(_Position, _First, _Last, _Dist)
constexpr bool operator<=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator>=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator<(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator>(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
basic_string< char > string
A string of char.
basic_string< wchar_t > wstring
A string of wchar_t.
ISO C++ entities toplevel namespace is std.
basic_istream< _CharT, _Traits > & getline(basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str, _CharT __delim)
Read a line from stream into a string.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
GNU debug classes for public use.
basic_string< char32_t > u32string
A string of char32_t.
const _CharT * __check_string(const _CharT *__s, _Integer __n, const char *__file, unsigned int __line, const char *__function)
constexpr _Iterator __base(_Iterator __it)
basic_string< char16_t > u16string
A string of char16_t.
Template class basic_istream.
Template class basic_ostream.
Primary class template hash.
constexpr _Iterator & base() noexcept
Return the underlying iterator.
Managing sequences of characters and character-like objects.
void swap(basic_string &__s) noexcept(/*conditional */)
Swap contents with another string.
void push_back(_CharT __c)
Append a single character.
size_type find_first_of(const basic_string &__str, size_type __pos=0) const noexcept
Find position of a character of string.
const _CharT * data() const noexcept
Return const pointer to contents.
basic_string substr(size_type __pos=0, size_type __n=npos) const
Get a substring.
size_type find(const _CharT *__s, size_type __pos, size_type __n) const noexcept
Find position of a C substring.
size_type find_last_not_of(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a character not in string.
int compare(const basic_string &__str) const
Compare to a string.
size_type find_first_not_of(const basic_string &__str, size_type __pos=0) const noexcept
Find position of a character not in string.
void insert(iterator __p, size_type __n, _CharT __c)
Insert multiple characters.
basic_string & assign(const basic_string &__str)
Set value to contents of another string.
void pop_back()
Remove the last character.
size_type copy(_CharT *__s, size_type __n, size_type __pos=0) const
Copy substring into C string.
size_type length() const noexcept
Returns the number of characters in the string, not including any null-termination.
size_type find_last_of(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a character of string.
basic_string & operator+=(const basic_string &__str)
Append a string to this string.
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
size_type rfind(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a string.
void resize(size_type __n, _CharT __c)
Resizes the string to the specified number of characters.
void reserve()
Equivalent to shrink_to_fit().
const_reference at(size_type __n) const
Provides access to the data contained in the string.
basic_string & append(const basic_string &__str)
Append a string to this string.
basic_string & operator=(const basic_string &__str)
Assign the value of str to this string.
const_reference operator[](size_type __pos) const noexcept
Subscript access to the data contained in the string.
bool empty() const noexcept
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
static const size_type npos
Value returned by various member functions when they fail.
allocator_type get_allocator() const noexcept
Return copy of allocator used to construct this string.
const_iterator cbegin() const noexcept
size_type capacity() const noexcept
size_type max_size() const noexcept
Returns the size() of the largest possible string.
basic_string & erase(size_type __pos=0, size_type __n=npos)
Remove characters.
basic_string & replace(size_type __pos, size_type __n, const basic_string &__str)
Replace characters with value from another string.
Struct holding two objects of arbitrary type.
_T2 second
The second member.
Base class for constructing a safe sequence type that tracks iterators that reference it.
Safe class dealing with some allocator dependent operations.
Class std::basic_string with safety/checking/debug instrumentation.
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
void reserve()
Equivalent to shrink_to_fit().
size_type capacity() const noexcept