29#ifndef _GLIBCXX_DEBUG_STRING
30#define _GLIBCXX_DEBUG_STRING 1
33#pragma GCC system_header
41#define _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_Cond,_File,_Line,_Func) \
43 __gnu_debug::_Error_formatter::_S_at(_File, _Line, _Func) \
44 ._M_message(#_Cond)._M_error()
46#if _GLIBCXX_USE_CXX11_ABI && __cplusplus >= 201103
47# define _GLIBCXX_INSERT_RETURNS_ITERATOR 1
48# define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr) expr
50# define _GLIBCXX_INSERT_RETURNS_ITERATOR 0
51# define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr)
54#ifdef _GLIBCXX_DEBUG_PEDANTIC
55# if __cplusplus < 201103L
56# define __glibcxx_check_string(_String) \
57 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0, \
60# define __glibcxx_check_string_len(_String,_Len) \
61 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0 || _Len == 0, \
65# define __glibcxx_check_string(_String) \
66 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != nullptr, \
69# define __glibcxx_check_string_len(_String,_Len) \
70 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != nullptr || _Len == 0, \
75# define __glibcxx_check_string(_String)
76# define __glibcxx_check_string_len(_String,_Len)
82 template<
typename _CharT,
typename _Integer>
85 _Integer __n __attribute__((__unused__)),
86 const char* __file __attribute__((__unused__)),
87 unsigned int __line __attribute__((__unused__)),
88 const char* __function __attribute__((__unused__)))
90#ifdef _GLIBCXX_DEBUG_PEDANTIC
91# if __cplusplus < 201103L
92 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0 || __n == 0,
93 __file, __line, __function);
95 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s !=
nullptr || __n == 0,
96 __file, __line, __function);
103 template<
typename _CharT>
106 const char* __file __attribute__((__unused__)),
107 unsigned int __line __attribute__((__unused__)),
108 const char* __function __attribute__((__unused__)))
110#ifdef _GLIBCXX_DEBUG_PEDANTIC
111# if __cplusplus < 201103L
112 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0,
113 __file, __line, __function);
115 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s !=
nullptr,
116 __file, __line, __function);
122#define __glibcxx_check_string_n_constructor(_Str, _Size) \
123 __check_string(_Str, _Size, __FILE__, __LINE__, __PRETTY_FUNCTION__)
125#define __glibcxx_check_string_constructor(_Str) \
126 __check_string(_Str, __FILE__, __LINE__, __PRETTY_FUNCTION__)
129 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
130 typename _Allocator = std::allocator<_CharT> >
133 basic_string<_CharT, _Traits, _Allocator>,
134 _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>,
142 template<
typename _ItT,
typename _SeqT,
typename _CatT>
143 friend class ::__gnu_debug::_Safe_iterator;
151 typedef _Traits traits_type;
152 typedef typename _Traits::char_type value_type;
153 typedef _Allocator allocator_type;
154 typedef typename _Base::size_type size_type;
155 typedef typename _Base::difference_type difference_type;
156 typedef typename _Base::reference reference;
157 typedef typename _Base::const_reference const_reference;
158 typedef typename _Base::pointer pointer;
159 typedef typename _Base::const_pointer const_pointer;
177#if __cplusplus < 201103L
190 const _Allocator& __a = _Allocator())
195 :
_Base(__s, __a) { }
219 const _Allocator& __a = _Allocator())
220 :
_Base(__str, __pos, __n, __a) { }
223 const _Allocator& __a = _Allocator())
224 :
_Base(__glibcxx_check_string_n_constructor(__s, __n), __n, __a) { }
226 basic_string(
const _CharT* __s,
const _Allocator& __a = _Allocator())
227 :
_Base(__glibcxx_check_string_constructor(__s), __a)
231 const _Allocator& __a = _Allocator())
232 :
_Base(__n, __c, __a) { }
234 template<
typename _InputIterator>
235 basic_string(_InputIterator __begin, _InputIterator __end,
236 const _Allocator& __a = _Allocator())
238 __glibcxx_check_valid_constructor_range(__begin, __end)),
241#if __cplusplus >= 201103L
250 operator=(
const _CharT* __s)
252 __glibcxx_check_string(__s);
254 this->_M_invalidate_all();
259 operator=(_CharT __c)
262 this->_M_invalidate_all();
266#if __cplusplus >= 201103L
271 this->_M_invalidate_all();
282 begin()
const _GLIBCXX_NOEXCEPT
290 end()
const _GLIBCXX_NOEXCEPT
298 rbegin()
const _GLIBCXX_NOEXCEPT
306 rend()
const _GLIBCXX_NOEXCEPT
309#if __cplusplus >= 201103L
311 cbegin()
const noexcept
315 cend()
const noexcept
319 crbegin()
const noexcept
323 crend()
const noexcept
333 resize(size_type __n, _CharT __c)
336 this->_M_invalidate_all();
340 resize(size_type __n)
341 { this->resize(__n, _CharT()); }
343#if __cplusplus >= 201103L
345 shrink_to_fit()
noexcept
352 this->_M_invalidate_all();
367 this->_M_invalidate_all();
374 operator[](size_type __pos)
const _GLIBCXX_NOEXCEPT
376 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
377 _M_message(__gnu_debug::__msg_subscript_oob)
378 ._M_sequence(*
this,
"this")
379 ._M_integer(__pos,
"__pos")
380 ._M_integer(this->
size(),
"size"));
385 operator[](size_type __pos)
387#if __cplusplus < 201103L && defined(_GLIBCXX_DEBUG_PEDANTIC)
388 __glibcxx_check_subscript(__pos);
391 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
392 _M_message(__gnu_debug::__msg_subscript_oob)
393 ._M_sequence(*
this,
"this")
394 ._M_integer(__pos,
"__pos")
395 ._M_integer(this->
size(),
"size"));
402#if __cplusplus >= 201103L
412 this->_M_invalidate_all();
417 operator+=(
const _CharT* __s)
419 __glibcxx_check_string(__s);
421 this->_M_invalidate_all();
426 operator+=(_CharT __c)
429 this->_M_invalidate_all();
433#if __cplusplus >= 201103L
438 this->_M_invalidate_all();
447 this->_M_invalidate_all();
452 append(
const basic_string& __str, size_type __pos, size_type __n)
455 this->_M_invalidate_all();
460 append(
const _CharT* __s, size_type __n)
462 __glibcxx_check_string_len(__s, __n);
464 this->_M_invalidate_all();
469 append(
const _CharT* __s)
471 __glibcxx_check_string(__s);
473 this->_M_invalidate_all();
478 append(size_type __n, _CharT __c)
481 this->_M_invalidate_all();
485 template<
typename _InputIterator>
487 append(_InputIterator __first, _InputIterator __last)
490 __glibcxx_check_valid_range2(__first, __last, __dist);
492 if (__dist.
second >= __dp_sign)
494 __gnu_debug::__unsafe(__last));
498 this->_M_invalidate_all();
505 push_back(_CharT __c)
508 this->_M_invalidate_all();
515 this->_M_invalidate_all();
519#if __cplusplus >= 201103L
522 noexcept(
noexcept(std::declval<_Base&>().assign(
std::move(__x))))
525 this->_M_invalidate_all();
531 assign(
const basic_string& __str, size_type __pos, size_type __n)
534 this->_M_invalidate_all();
539 assign(
const _CharT* __s, size_type __n)
541 __glibcxx_check_string_len(__s, __n);
543 this->_M_invalidate_all();
548 assign(
const _CharT* __s)
550 __glibcxx_check_string(__s);
552 this->_M_invalidate_all();
557 assign(size_type __n, _CharT __c)
560 this->_M_invalidate_all();
564 template<
typename _InputIterator>
566 assign(_InputIterator __first, _InputIterator __last)
569 __glibcxx_check_valid_range2(__first, __last, __dist);
571 if (__dist.
second >= __dp_sign)
573 __gnu_debug::__unsafe(__last));
577 this->_M_invalidate_all();
581#if __cplusplus >= 201103L
586 this->_M_invalidate_all();
595 this->_M_invalidate_all();
601 size_type __pos2, size_type __n)
604 this->_M_invalidate_all();
609 insert(size_type __pos,
const _CharT* __s, size_type __n)
611 __glibcxx_check_string(__s);
613 this->_M_invalidate_all();
618 insert(size_type __pos,
const _CharT* __s)
620 __glibcxx_check_string(__s);
622 this->_M_invalidate_all();
627 insert(size_type __pos, size_type __n, _CharT __c)
630 this->_M_invalidate_all();
639 this->_M_invalidate_all();
643#if __cplusplus >= 201103L
648#if _GLIBCXX_USE_CXX11_ABI
653 typename _Base::iterator __res =
_Base::begin() + __offset;
655 this->_M_invalidate_all();
660 insert(
iterator __p, size_type __n, _CharT __c)
664 this->_M_invalidate_all();
668 template<
typename _InputIterator>
671 _InputIterator __first, _InputIterator __last)
676 typename _Base::iterator __res;
677#if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
680 if (__dist.
second >= __dp_sign)
682 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
684 __gnu_debug::__unsafe(__last));
688 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
692#if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
695 this->_M_invalidate_all();
699#if __cplusplus >= 201103L
704#if _GLIBCXX_USE_CXX11_ABI
711 this->_M_invalidate_all();
717 erase(size_type __pos = 0, size_type __n =
_Base::npos)
720 this->_M_invalidate_all();
729 this->_M_invalidate_all();
739 typename _Base::iterator __res =
_Base::erase(__first.base(),
741 this->_M_invalidate_all();
745#if __cplusplus >= 201103L
749 __glibcxx_check_nonempty();
751 this->_M_invalidate_all();
756 replace(size_type __pos1, size_type __n1,
const basic_string& __str)
759 this->_M_invalidate_all();
764 replace(size_type __pos1, size_type __n1,
const basic_string& __str,
765 size_type __pos2, size_type __n2)
768 this->_M_invalidate_all();
773 replace(size_type __pos, size_type __n1,
const _CharT* __s,
776 __glibcxx_check_string_len(__s, __n2);
778 this->_M_invalidate_all();
783 replace(size_type __pos, size_type __n1,
const _CharT* __s)
785 __glibcxx_check_string(__s);
787 this->_M_invalidate_all();
792 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
795 this->_M_invalidate_all();
805 this->_M_invalidate_all();
811 const _CharT* __s, size_type __n)
814 __glibcxx_check_string_len(__s, __n);
816 this->_M_invalidate_all();
825 __glibcxx_check_string(__s);
827 this->_M_invalidate_all();
833 size_type __n, _CharT __c)
837 this->_M_invalidate_all();
841 template<
typename _InputIterator>
844 _InputIterator __j1, _InputIterator __j2)
849 __glibcxx_check_valid_range2(__j1, __j2, __dist);
851 if (__dist.
second >= __dp_sign)
853 __gnu_debug::__unsafe(__j1),
854 __gnu_debug::__unsafe(__j2));
858 this->_M_invalidate_all();
862#if __cplusplus >= 201103L
869 this->_M_invalidate_all();
875 copy(_CharT* __s, size_type __n, size_type __pos = 0)
const
877 __glibcxx_check_string_len(__s, __n);
883 _GLIBCXX_NOEXCEPT_IF(std::__is_nothrow_swappable<_Base>::value)
891 c_str()
const _GLIBCXX_NOEXCEPT
894 this->_M_invalidate_all();
899 data()
const _GLIBCXX_NOEXCEPT
902 this->_M_invalidate_all();
912 find(
const _CharT* __s, size_type __pos, size_type __n)
const
915 __glibcxx_check_string(__s);
921 find(
const _CharT* __s, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
923 __glibcxx_check_string(__s);
931 rfind(
const _CharT* __s, size_type __pos, size_type __n)
const
933 __glibcxx_check_string_len(__s, __n);
939 rfind(
const _CharT* __s, size_type __pos =
_Base::npos)
const
941 __glibcxx_check_string(__s);
949 find_first_of(
const _CharT* __s, size_type __pos, size_type __n)
const
952 __glibcxx_check_string(__s);
958 find_first_of(
const _CharT* __s, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
960 __glibcxx_check_string(__s);
968 find_last_of(
const _CharT* __s, size_type __pos, size_type __n)
const
971 __glibcxx_check_string(__s);
977 find_last_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
980 __glibcxx_check_string(__s);
988 find_first_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
991 __glibcxx_check_string_len(__s, __n);
997 find_first_not_of(
const _CharT* __s, size_type __pos = 0)
const
1000 __glibcxx_check_string(__s);
1006 _GLIBCXX20_CONSTEXPR
1008 find_last_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
1011 __glibcxx_check_string(__s);
1015 _GLIBCXX20_CONSTEXPR
1017 find_last_not_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
1020 __glibcxx_check_string(__s);
1025 substr(size_type __pos = 0, size_type __n =
_Base::npos)
const
1030 _GLIBCXX20_CONSTEXPR
1032 compare(
const _CharT* __s)
const _GLIBCXX_NOEXCEPT
1034 __glibcxx_check_string(__s);
1040 _GLIBCXX20_CONSTEXPR
1042 compare(size_type __pos1, size_type __n1,
const _CharT* __s)
const
1044 __glibcxx_check_string(__s);
1050 _GLIBCXX20_CONSTEXPR
1052 compare(size_type __pos1, size_type __n1,
const _CharT* __s,
1053 size_type __n2)
const
1055 __glibcxx_check_string_len(__s, __n2);
1060 _M_base() _GLIBCXX_NOEXCEPT {
return *
this; }
1063 _M_base()
const _GLIBCXX_NOEXCEPT {
return *
this; }
1065 using _Safe::_M_invalidate_all;
1068 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1074 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1075 inline basic_string<_CharT,_Traits,_Allocator>
1076 operator+(
const _CharT* __lhs,
1077 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1079 __glibcxx_check_string(__lhs);
1080 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1083 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1084 inline basic_string<_CharT,_Traits,_Allocator>
1086 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1087 {
return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
1089 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1090 inline basic_string<_CharT,_Traits,_Allocator>
1091 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1092 const _CharT* __rhs)
1094 __glibcxx_check_string(__rhs);
1095 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1098 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1099 inline basic_string<_CharT,_Traits,_Allocator>
1100 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1102 {
return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
1104 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1106 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1107 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1108 {
return __lhs._M_base() == __rhs._M_base(); }
1110 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1112 operator==(
const _CharT* __lhs,
1113 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1115 __glibcxx_check_string(__lhs);
1116 return __lhs == __rhs._M_base();
1119 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1121 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1122 const _CharT* __rhs)
1124 __glibcxx_check_string(__rhs);
1125 return __lhs._M_base() == __rhs;
1128 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1130 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1131 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1132 {
return __lhs._M_base() != __rhs._M_base(); }
1134 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1136 operator!=(
const _CharT* __lhs,
1137 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1139 __glibcxx_check_string(__lhs);
1140 return __lhs != __rhs._M_base();
1143 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1145 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1146 const _CharT* __rhs)
1148 __glibcxx_check_string(__rhs);
1149 return __lhs._M_base() != __rhs;
1152 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1154 operator<(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1155 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1156 {
return __lhs._M_base() < __rhs._M_base(); }
1158 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1161 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1163 __glibcxx_check_string(__lhs);
1164 return __lhs < __rhs._M_base();
1167 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1169 operator<(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1170 const _CharT* __rhs)
1172 __glibcxx_check_string(__rhs);
1173 return __lhs._M_base() < __rhs;
1176 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1178 operator<=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1179 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1180 {
return __lhs._M_base() <= __rhs._M_base(); }
1182 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1185 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1187 __glibcxx_check_string(__lhs);
1188 return __lhs <= __rhs._M_base();
1191 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1193 operator<=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1194 const _CharT* __rhs)
1196 __glibcxx_check_string(__rhs);
1197 return __lhs._M_base() <= __rhs;
1200 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1202 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1203 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1204 {
return __lhs._M_base() >= __rhs._M_base(); }
1206 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1209 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1211 __glibcxx_check_string(__lhs);
1212 return __lhs >= __rhs._M_base();
1215 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1217 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1218 const _CharT* __rhs)
1220 __glibcxx_check_string(__rhs);
1221 return __lhs._M_base() >= __rhs;
1224 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1226 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1227 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1228 {
return __lhs._M_base() > __rhs._M_base(); }
1230 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1233 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1235 __glibcxx_check_string(__lhs);
1236 return __lhs > __rhs._M_base();
1239 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1241 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1242 const _CharT* __rhs)
1244 __glibcxx_check_string(__rhs);
1245 return __lhs._M_base() > __rhs;
1249 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1251 swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
1252 basic_string<_CharT,_Traits,_Allocator>& __rhs)
1253 { __lhs.swap(__rhs); }
1255 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1258 const basic_string<_CharT, _Traits, _Allocator>& __str)
1259 {
return __os << __str._M_base(); }
1261 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1264 basic_string<_CharT,_Traits,_Allocator>& __str)
1267 __str._M_invalidate_all();
1271 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1274 basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
1279 __str._M_invalidate_all();
1283 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1286 basic_string<_CharT,_Traits,_Allocator>& __str)
1290 __str._M_invalidate_all();
1294 typedef basic_string<char>
string;
1296 typedef basic_string<wchar_t>
wstring;
1298#ifdef _GLIBCXX_USE_CHAR8_T
1300 typedef basic_string<char8_t> u8string;
1303#if __cplusplus >= 201103L
1311 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1312 struct _Insert_range_from_self_is_safe<
1314 {
enum { __value = 1 }; };
1318#if __cplusplus >= 201103L
1319namespace std _GLIBCXX_VISIBILITY(default)
1321_GLIBCXX_BEGIN_NAMESPACE_VERSION
1324 template<
typename _CharT>
1326 :
public hash<std::basic_string<_CharT>>
1329 template<
typename _CharT>
1334_GLIBCXX_END_NAMESPACE_VERSION
1338#undef _GLIBCXX_INSERT_RETURNS_ITERATOR
1339#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