60 #ifndef _STL_ITERATOR_H 61 #define _STL_ITERATOR_H 1 68 #if __cplusplus >= 201103L 72 #if __cplusplus > 201402L 73 # define __cpp_lib_array_constexpr 201603 76 namespace std _GLIBCXX_VISIBILITY(default)
78 _GLIBCXX_BEGIN_NAMESPACE_VERSION
104 template<
typename _Iterator>
106 :
public iterator<typename iterator_traits<_Iterator>::iterator_category,
107 typename iterator_traits<_Iterator>::value_type,
108 typename iterator_traits<_Iterator>::difference_type,
109 typename iterator_traits<_Iterator>::pointer,
110 typename iterator_traits<_Iterator>::reference>
115 typedef iterator_traits<_Iterator> __traits_type;
118 typedef _Iterator iterator_type;
119 typedef typename __traits_type::difference_type difference_type;
120 typedef typename __traits_type::pointer pointer;
121 typedef typename __traits_type::reference reference;
136 explicit _GLIBCXX17_CONSTEXPR
144 : current(__x.current) { }
146 #if __cplusplus >= 201103L 154 template<
typename _Iter>
157 : current(__x.
base()) { }
162 _GLIBCXX17_CONSTEXPR iterator_type
176 _GLIBCXX17_CONSTEXPR reference
179 _Iterator __tmp = current;
188 _GLIBCXX17_CONSTEXPR pointer
193 _Iterator __tmp = current;
195 return _S_to_pointer(__tmp);
297 _GLIBCXX17_CONSTEXPR reference
299 {
return *(*
this + __n); }
302 template<
typename _Tp>
303 static _GLIBCXX17_CONSTEXPR _Tp*
304 _S_to_pointer(_Tp* __p)
307 template<
typename _Tp>
308 static _GLIBCXX17_CONSTEXPR pointer
309 _S_to_pointer(_Tp __t)
310 {
return __t.operator->(); }
323 template<
typename _Iterator>
324 inline _GLIBCXX17_CONSTEXPR
bool 327 {
return __x.
base() == __y.
base(); }
329 template<
typename _Iterator>
330 inline _GLIBCXX17_CONSTEXPR
bool 331 operator<(const reverse_iterator<_Iterator>& __x,
332 const reverse_iterator<_Iterator>& __y)
333 {
return __y.base() < __x.base(); }
335 template<
typename _Iterator>
336 inline _GLIBCXX17_CONSTEXPR
bool 337 operator!=(
const reverse_iterator<_Iterator>& __x,
338 const reverse_iterator<_Iterator>& __y)
339 {
return !(__x == __y); }
341 template<
typename _Iterator>
342 inline _GLIBCXX17_CONSTEXPR
bool 343 operator>(
const reverse_iterator<_Iterator>& __x,
344 const reverse_iterator<_Iterator>& __y)
345 {
return __y < __x; }
347 template<
typename _Iterator>
348 inline _GLIBCXX17_CONSTEXPR
bool 349 operator<=(const reverse_iterator<_Iterator>& __x,
350 const reverse_iterator<_Iterator>& __y)
351 {
return !(__y < __x); }
353 template<
typename _Iterator>
354 inline _GLIBCXX17_CONSTEXPR
bool 355 operator>=(
const reverse_iterator<_Iterator>& __x,
356 const reverse_iterator<_Iterator>& __y)
357 {
return !(__x < __y); }
361 template<
typename _IteratorL,
typename _IteratorR>
362 inline _GLIBCXX17_CONSTEXPR
bool 363 operator==(
const reverse_iterator<_IteratorL>& __x,
364 const reverse_iterator<_IteratorR>& __y)
365 {
return __x.base() == __y.base(); }
367 template<
typename _IteratorL,
typename _IteratorR>
368 inline _GLIBCXX17_CONSTEXPR
bool 369 operator<(const reverse_iterator<_IteratorL>& __x,
370 const reverse_iterator<_IteratorR>& __y)
371 {
return __y.base() < __x.base(); }
373 template<
typename _IteratorL,
typename _IteratorR>
374 inline _GLIBCXX17_CONSTEXPR
bool 375 operator!=(
const reverse_iterator<_IteratorL>& __x,
376 const reverse_iterator<_IteratorR>& __y)
377 {
return !(__x == __y); }
379 template<
typename _IteratorL,
typename _IteratorR>
380 inline _GLIBCXX17_CONSTEXPR
bool 381 operator>(
const reverse_iterator<_IteratorL>& __x,
382 const reverse_iterator<_IteratorR>& __y)
383 {
return __y < __x; }
385 template<
typename _IteratorL,
typename _IteratorR>
386 inline _GLIBCXX17_CONSTEXPR
bool 387 operator<=(const reverse_iterator<_IteratorL>& __x,
388 const reverse_iterator<_IteratorR>& __y)
389 {
return !(__y < __x); }
391 template<
typename _IteratorL,
typename _IteratorR>
392 inline _GLIBCXX17_CONSTEXPR
bool 393 operator>=(
const reverse_iterator<_IteratorL>& __x,
394 const reverse_iterator<_IteratorR>& __y)
395 {
return !(__x < __y); }
398 #if __cplusplus < 201103L 399 template<
typename _Iterator>
400 inline typename reverse_iterator<_Iterator>::difference_type
401 operator-(
const reverse_iterator<_Iterator>& __x,
402 const reverse_iterator<_Iterator>& __y)
403 {
return __y.base() - __x.base(); }
405 template<
typename _IteratorL,
typename _IteratorR>
406 inline typename reverse_iterator<_IteratorL>::difference_type
407 operator-(
const reverse_iterator<_IteratorL>& __x,
408 const reverse_iterator<_IteratorR>& __y)
409 {
return __y.base() - __x.base(); }
413 template<
typename _IteratorL,
typename _IteratorR>
414 inline _GLIBCXX17_CONSTEXPR
auto 415 operator-(
const reverse_iterator<_IteratorL>& __x,
416 const reverse_iterator<_IteratorR>& __y)
417 -> decltype(__y.base() - __x.base())
418 {
return __y.base() - __x.base(); }
421 template<
typename _Iterator>
422 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator>
423 operator+(
typename reverse_iterator<_Iterator>::difference_type __n,
424 const reverse_iterator<_Iterator>& __x)
425 {
return reverse_iterator<_Iterator>(__x.base() - __n); }
427 #if __cplusplus >= 201103L 429 template<
typename _Iterator>
430 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator>
431 __make_reverse_iterator(_Iterator __i)
432 {
return reverse_iterator<_Iterator>(__i); }
434 # if __cplusplus > 201103L 435 # define __cpp_lib_make_reverse_iterator 201402 440 template<
typename _Iterator>
441 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator>
447 #if __cplusplus >= 201103L 448 template<
typename _Iterator>
450 __niter_base(reverse_iterator<_Iterator> __it)
451 -> decltype(__make_reverse_iterator(__niter_base(__it.base())))
452 {
return __make_reverse_iterator(__niter_base(__it.base())); }
454 template<
typename _Iterator>
455 struct __is_move_iterator<reverse_iterator<_Iterator> >
456 : __is_move_iterator<_Iterator>
459 template<
typename _Iterator>
461 __miter_base(reverse_iterator<_Iterator> __it)
462 -> decltype(__make_reverse_iterator(__miter_base(__it.base())))
463 {
return __make_reverse_iterator(__miter_base(__it.base())); }
477 template<
typename _Container>
479 :
public iterator<output_iterator_tag, void, void, void, void>
482 _Container* container;
504 #if __cplusplus < 201103L 506 operator=(
typename _Container::const_reference __value)
508 container->push_back(__value);
513 operator=(
const typename _Container::value_type& __value)
515 container->push_back(__value);
520 operator=(
typename _Container::value_type&& __value)
522 container->push_back(std::move(__value));
554 template<
typename _Container>
555 inline back_insert_iterator<_Container>
569 template<
typename _Container>
571 :
public iterator<output_iterator_tag, void, void, void, void>
574 _Container* container;
595 #if __cplusplus < 201103L 597 operator=(
typename _Container::const_reference __value)
599 container->push_front(__value);
604 operator=(
const typename _Container::value_type& __value)
606 container->push_front(__value);
611 operator=(
typename _Container::value_type&& __value)
613 container->push_front(std::move(__value));
645 template<
typename _Container>
646 inline front_insert_iterator<_Container>
664 template<
typename _Container>
666 :
public iterator<output_iterator_tag, void, void, void, void>
669 _Container* container;
670 typename _Container::iterator iter;
706 #if __cplusplus < 201103L 708 operator=(
typename _Container::const_reference __value)
710 iter = container->insert(iter, __value);
716 operator=(
const typename _Container::value_type& __value)
718 iter = container->insert(iter, __value);
724 operator=(
typename _Container::value_type&& __value)
726 iter = container->insert(iter, std::move(__value));
760 template<
typename _Container,
typename _Iterator>
761 inline insert_iterator<_Container>
765 typename _Container::iterator(__i));
770 _GLIBCXX_END_NAMESPACE_VERSION
773 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
775 _GLIBCXX_BEGIN_NAMESPACE_VERSION
784 using std::iterator_traits;
786 template<
typename _Iterator,
typename _Container>
787 class __normal_iterator
790 _Iterator _M_current;
792 typedef iterator_traits<_Iterator> __traits_type;
795 typedef _Iterator iterator_type;
796 typedef typename __traits_type::iterator_category iterator_category;
797 typedef typename __traits_type::value_type value_type;
798 typedef typename __traits_type::difference_type difference_type;
799 typedef typename __traits_type::reference reference;
800 typedef typename __traits_type::pointer pointer;
802 _GLIBCXX_CONSTEXPR __normal_iterator() _GLIBCXX_NOEXCEPT
803 : _M_current(_Iterator()) { }
806 __normal_iterator(
const _Iterator& __i) _GLIBCXX_NOEXCEPT
807 : _M_current(__i) { }
810 template<
typename _Iter>
811 __normal_iterator(
const __normal_iterator<_Iter,
812 typename __enable_if<
813 (std::__are_same<_Iter, typename _Container::pointer>::__value),
814 _Container>::__type>& __i) _GLIBCXX_NOEXCEPT
815 : _M_current(__i.base()) { }
819 operator*() const _GLIBCXX_NOEXCEPT
820 {
return *_M_current; }
823 operator->() const _GLIBCXX_NOEXCEPT
824 {
return _M_current; }
827 operator++() _GLIBCXX_NOEXCEPT
834 operator++(
int) _GLIBCXX_NOEXCEPT
835 {
return __normal_iterator(_M_current++); }
839 operator--() _GLIBCXX_NOEXCEPT
846 operator--(
int) _GLIBCXX_NOEXCEPT
847 {
return __normal_iterator(_M_current--); }
851 operator[](difference_type __n)
const _GLIBCXX_NOEXCEPT
852 {
return _M_current[__n]; }
855 operator+=(difference_type __n) _GLIBCXX_NOEXCEPT
856 { _M_current += __n;
return *
this; }
859 operator+(difference_type __n)
const _GLIBCXX_NOEXCEPT
860 {
return __normal_iterator(_M_current + __n); }
863 operator-=(difference_type __n) _GLIBCXX_NOEXCEPT
864 { _M_current -= __n;
return *
this; }
867 operator-(difference_type __n)
const _GLIBCXX_NOEXCEPT
868 {
return __normal_iterator(_M_current - __n); }
871 base() const _GLIBCXX_NOEXCEPT
872 {
return _M_current; }
884 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
886 operator==(
const __normal_iterator<_IteratorL, _Container>& __lhs,
887 const __normal_iterator<_IteratorR, _Container>& __rhs)
889 {
return __lhs.base() == __rhs.base(); }
891 template<
typename _Iterator,
typename _Container>
893 operator==(
const __normal_iterator<_Iterator, _Container>& __lhs,
894 const __normal_iterator<_Iterator, _Container>& __rhs)
896 {
return __lhs.base() == __rhs.base(); }
898 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
900 operator!=(
const __normal_iterator<_IteratorL, _Container>& __lhs,
901 const __normal_iterator<_IteratorR, _Container>& __rhs)
903 {
return __lhs.base() != __rhs.base(); }
905 template<
typename _Iterator,
typename _Container>
907 operator!=(
const __normal_iterator<_Iterator, _Container>& __lhs,
908 const __normal_iterator<_Iterator, _Container>& __rhs)
910 {
return __lhs.base() != __rhs.base(); }
913 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
915 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
916 const __normal_iterator<_IteratorR, _Container>& __rhs)
918 {
return __lhs.base() < __rhs.base(); }
920 template<
typename _Iterator,
typename _Container>
922 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
923 const __normal_iterator<_Iterator, _Container>& __rhs)
925 {
return __lhs.base() < __rhs.base(); }
927 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
929 operator>(
const __normal_iterator<_IteratorL, _Container>& __lhs,
930 const __normal_iterator<_IteratorR, _Container>& __rhs)
932 {
return __lhs.base() > __rhs.base(); }
934 template<
typename _Iterator,
typename _Container>
936 operator>(
const __normal_iterator<_Iterator, _Container>& __lhs,
937 const __normal_iterator<_Iterator, _Container>& __rhs)
939 {
return __lhs.base() > __rhs.base(); }
941 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
943 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
944 const __normal_iterator<_IteratorR, _Container>& __rhs)
946 {
return __lhs.base() <= __rhs.base(); }
948 template<
typename _Iterator,
typename _Container>
950 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
951 const __normal_iterator<_Iterator, _Container>& __rhs)
953 {
return __lhs.base() <= __rhs.base(); }
955 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
957 operator>=(
const __normal_iterator<_IteratorL, _Container>& __lhs,
958 const __normal_iterator<_IteratorR, _Container>& __rhs)
960 {
return __lhs.base() >= __rhs.base(); }
962 template<
typename _Iterator,
typename _Container>
964 operator>=(
const __normal_iterator<_Iterator, _Container>& __lhs,
965 const __normal_iterator<_Iterator, _Container>& __rhs)
967 {
return __lhs.base() >= __rhs.base(); }
973 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
974 #if __cplusplus >= 201103L 977 operator-(
const __normal_iterator<_IteratorL, _Container>& __lhs,
978 const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept
979 -> decltype(__lhs.base() - __rhs.base())
981 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
982 operator-(
const __normal_iterator<_IteratorL, _Container>& __lhs,
983 const __normal_iterator<_IteratorR, _Container>& __rhs)
985 {
return __lhs.base() - __rhs.base(); }
987 template<
typename _Iterator,
typename _Container>
988 inline typename __normal_iterator<_Iterator, _Container>::difference_type
989 operator-(
const __normal_iterator<_Iterator, _Container>& __lhs,
990 const __normal_iterator<_Iterator, _Container>& __rhs)
992 {
return __lhs.base() - __rhs.base(); }
994 template<
typename _Iterator,
typename _Container>
995 inline __normal_iterator<_Iterator, _Container>
996 operator+(
typename __normal_iterator<_Iterator, _Container>::difference_type
997 __n,
const __normal_iterator<_Iterator, _Container>& __i)
999 {
return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
1001 _GLIBCXX_END_NAMESPACE_VERSION
1004 namespace std _GLIBCXX_VISIBILITY(default)
1006 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1008 template<
typename _Iterator,
typename _Container>
1010 __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it)
1012 {
return __it.base(); }
1014 #if __cplusplus >= 201103L 1030 template<
typename _Iterator>
1034 _Iterator _M_current;
1036 typedef iterator_traits<_Iterator> __traits_type;
1037 typedef typename __traits_type::reference __base_ref;
1040 typedef _Iterator iterator_type;
1041 typedef typename __traits_type::iterator_category iterator_category;
1042 typedef typename __traits_type::value_type value_type;
1043 typedef typename __traits_type::difference_type difference_type;
1045 typedef _Iterator pointer;
1049 typename remove_reference<__base_ref>::type&&,
1050 __base_ref>::type reference;
1052 _GLIBCXX17_CONSTEXPR
1056 explicit _GLIBCXX17_CONSTEXPR
1058 : _M_current(__i) { }
1060 template<
typename _Iter>
1061 _GLIBCXX17_CONSTEXPR
1063 : _M_current(__i.base()) { }
1065 _GLIBCXX17_CONSTEXPR iterator_type
1067 {
return _M_current; }
1069 _GLIBCXX17_CONSTEXPR reference
1071 {
return static_cast<reference
>(*_M_current); }
1073 _GLIBCXX17_CONSTEXPR pointer
1075 {
return _M_current; }
1108 operator+(difference_type __n)
const 1112 operator+=(difference_type __n)
1119 operator-(difference_type __n)
const 1123 operator-=(difference_type __n)
1129 _GLIBCXX17_CONSTEXPR reference
1130 operator[](difference_type __n)
const 1131 {
return std::move(_M_current[__n]); }
1137 template<
typename _IteratorL,
typename _IteratorR>
1138 inline _GLIBCXX17_CONSTEXPR
bool 1141 {
return __x.base() == __y.base(); }
1143 template<
typename _Iterator>
1144 inline _GLIBCXX17_CONSTEXPR
bool 1145 operator==(
const move_iterator<_Iterator>& __x,
1146 const move_iterator<_Iterator>& __y)
1147 {
return __x.base() == __y.base(); }
1149 template<
typename _IteratorL,
typename _IteratorR>
1150 inline _GLIBCXX17_CONSTEXPR
bool 1151 operator!=(
const move_iterator<_IteratorL>& __x,
1152 const move_iterator<_IteratorR>& __y)
1153 {
return !(__x == __y); }
1155 template<
typename _Iterator>
1156 inline _GLIBCXX17_CONSTEXPR
bool 1157 operator!=(
const move_iterator<_Iterator>& __x,
1158 const move_iterator<_Iterator>& __y)
1159 {
return !(__x == __y); }
1161 template<
typename _IteratorL,
typename _IteratorR>
1162 inline _GLIBCXX17_CONSTEXPR
bool 1163 operator<(const move_iterator<_IteratorL>& __x,
1164 const move_iterator<_IteratorR>& __y)
1165 {
return __x.base() < __y.base(); }
1167 template<
typename _Iterator>
1168 inline _GLIBCXX17_CONSTEXPR
bool 1169 operator<(const move_iterator<_Iterator>& __x,
1170 const move_iterator<_Iterator>& __y)
1171 {
return __x.base() < __y.base(); }
1173 template<
typename _IteratorL,
typename _IteratorR>
1174 inline _GLIBCXX17_CONSTEXPR
bool 1175 operator<=(const move_iterator<_IteratorL>& __x,
1176 const move_iterator<_IteratorR>& __y)
1177 {
return !(__y < __x); }
1179 template<
typename _Iterator>
1180 inline _GLIBCXX17_CONSTEXPR
bool 1181 operator<=(const move_iterator<_Iterator>& __x,
1182 const move_iterator<_Iterator>& __y)
1183 {
return !(__y < __x); }
1185 template<
typename _IteratorL,
typename _IteratorR>
1186 inline _GLIBCXX17_CONSTEXPR
bool 1187 operator>(
const move_iterator<_IteratorL>& __x,
1188 const move_iterator<_IteratorR>& __y)
1189 {
return __y < __x; }
1191 template<
typename _Iterator>
1192 inline _GLIBCXX17_CONSTEXPR
bool 1193 operator>(
const move_iterator<_Iterator>& __x,
1194 const move_iterator<_Iterator>& __y)
1195 {
return __y < __x; }
1197 template<
typename _IteratorL,
typename _IteratorR>
1198 inline _GLIBCXX17_CONSTEXPR
bool 1199 operator>=(
const move_iterator<_IteratorL>& __x,
1200 const move_iterator<_IteratorR>& __y)
1201 {
return !(__x < __y); }
1203 template<
typename _Iterator>
1204 inline _GLIBCXX17_CONSTEXPR
bool 1205 operator>=(
const move_iterator<_Iterator>& __x,
1206 const move_iterator<_Iterator>& __y)
1207 {
return !(__x < __y); }
1210 template<
typename _IteratorL,
typename _IteratorR>
1211 inline _GLIBCXX17_CONSTEXPR
auto 1212 operator-(
const move_iterator<_IteratorL>& __x,
1213 const move_iterator<_IteratorR>& __y)
1214 -> decltype(__x.base() - __y.base())
1215 {
return __x.base() - __y.base(); }
1217 template<
typename _Iterator>
1218 inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator>
1219 operator+(
typename move_iterator<_Iterator>::difference_type __n,
1220 const move_iterator<_Iterator>& __x)
1221 {
return __x + __n; }
1223 template<
typename _Iterator>
1224 inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator>
1225 make_move_iterator(_Iterator __i)
1226 {
return move_iterator<_Iterator>(__i); }
1228 template<
typename _Iterator,
typename _ReturnType
1229 =
typename conditional<__move_if_noexcept_cond
1230 <
typename iterator_traits<_Iterator>::value_type>::value,
1231 _Iterator, move_iterator<_Iterator>>::type>
1232 inline _GLIBCXX17_CONSTEXPR _ReturnType
1233 __make_move_if_noexcept_iterator(_Iterator __i)
1234 {
return _ReturnType(__i); }
1238 template<
typename _Tp,
typename _ReturnType
1239 =
typename conditional<__move_if_noexcept_cond<_Tp>::value,
1240 const _Tp*, move_iterator<_Tp*>>::type>
1241 inline _GLIBCXX17_CONSTEXPR _ReturnType
1242 __make_move_if_noexcept_iterator(_Tp* __i)
1243 {
return _ReturnType(__i); }
1247 template<
typename _Iterator>
1249 __niter_base(move_iterator<_Iterator> __it)
1250 -> decltype(make_move_iterator(__niter_base(__it.base())))
1251 {
return make_move_iterator(__niter_base(__it.base())); }
1253 template<
typename _Iterator>
1254 struct __is_move_iterator<move_iterator<_Iterator> >
1256 enum { __value = 1 };
1257 typedef __true_type __type;
1260 template<
typename _Iterator>
1262 __miter_base(move_iterator<_Iterator> __it)
1263 -> decltype(__miter_base(__it.base()))
1264 {
return __miter_base(__it.base()); }
1266 #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter) 1267 #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) \ 1268 std::__make_move_if_noexcept_iterator(_Iter) 1270 #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter) 1271 #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) (_Iter) 1274 #if __cpp_deduction_guides >= 201606 1277 template<
typename _InputIterator>
1279 typename iterator_traits<_InputIterator>::value_type::first_type>;
1281 template<
typename _InputIterator>
1282 using __iter_val_t =
1283 typename iterator_traits<_InputIterator>::value_type::second_type;
1285 template<
typename _T1,
typename _T2>
1288 template<
typename _InputIterator>
1289 using __iter_to_alloc_t =
1290 pair<add_const_t<__iter_key_t<_InputIterator>>,
1291 __iter_val_t<_InputIterator>>;
1295 _GLIBCXX_END_NAMESPACE_VERSION
1298 #ifdef _GLIBCXX_DEBUG _GLIBCXX17_CONSTEXPR reverse_iterator & operator-=(difference_type __n)
front_insert_iterator & operator*()
Simply returns *this.
front_insert_iterator(_Container &__x)
The only way to create this iterator is with a container.
Turns assignment into insertion.
_Container container_type
A nested typedef for the type of whatever container you used.
ISO C++ entities toplevel namespace is std.
insert_iterator(_Container &__x, typename _Container::iterator __i)
_GLIBCXX17_CONSTEXPR reverse_iterator< _Iterator > make_reverse_iterator(_Iterator __i)
Generator function for reverse_iterator.
_GLIBCXX17_CONSTEXPR reverse_iterator operator++(int)
_GLIBCXX17_CONSTEXPR reverse_iterator operator+(difference_type __n) const
back_insert_iterator operator++(int)
Simply returns *this. (This iterator does not move.)
_GLIBCXX20_CONSTEXPR complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
Turns assignment into insertion.
back_insert_iterator & operator=(const typename _Container::value_type &__value)
_GLIBCXX17_CONSTEXPR reference operator*() const
_GLIBCXX17_CONSTEXPR reverse_iterator & operator+=(difference_type __n)
Define a member typedef type to one of two argument types.
front_insert_iterator operator++(int)
Simply returns *this. (This iterator does not move.)
back_insert_iterator & operator++()
Simply returns *this. (This iterator does not move.)
_GLIBCXX17_CONSTEXPR reverse_iterator()
insert_iterator< _Container > inserter(_Container &__x, _Iterator __i)
_GLIBCXX17_CONSTEXPR pointer operator->() const
_GLIBCXX17_CONSTEXPR reverse_iterator(iterator_type __x)
back_insert_iterator(_Container &__x)
The only way to create this iterator is with a container.
_Container container_type
A nested typedef for the type of whatever container you used.
_GLIBCXX17_CONSTEXPR reverse_iterator operator-(difference_type __n) const
_GLIBCXX17_CONSTEXPR reverse_iterator & operator--()
is_nothrow_copy_constructible
back_insert_iterator< _Container > back_inserter(_Container &__x)
_GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator &__x)
insert_iterator & operator=(const typename _Container::value_type &__value)
front_insert_iterator & operator++()
Simply returns *this. (This iterator does not move.)
insert_iterator & operator*()
Simply returns *this.
_GLIBCXX17_CONSTEXPR reference operator[](difference_type __n) const
insert_iterator & operator++()
Simply returns *this. (This iterator does not move.)
back_insert_iterator & operator*()
Simply returns *this.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
GNU extensions for public use.
_GLIBCXX17_CONSTEXPR reverse_iterator operator--(int)
_GLIBCXX20_CONSTEXPR complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
_GLIBCXX17_CONSTEXPR reverse_iterator & operator++()
_GLIBCXX17_CONSTEXPR iterator_type base() const
_Container container_type
A nested typedef for the type of whatever container you used.
front_insert_iterator & operator=(const typename _Container::value_type &__value)
insert_iterator & operator++(int)
Simply returns *this. (This iterator does not move.)
Turns assignment into insertion.
typename remove_const< _Tp >::type remove_const_t
Alias template for remove_const.
_GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator< _Iter > &__x)
front_insert_iterator< _Container > front_inserter(_Container &__x)