29 #ifndef _GLIBCXX_DEBUG_LIST 30 #define _GLIBCXX_DEBUG_LIST 1 32 #ifdef _GLIBCXX_SYSHDR 33 #pragma GCC system_header 37 namespace std _GLIBCXX_VISIBILITY(default) {
namespace __debug {
38 template<
typename _Tp,
typename _Allocator>
class list;
46 namespace std _GLIBCXX_VISIBILITY(default)
51 template<
typename _Tp,
typename _Allocator = std::allocator<_Tp> >
54 list<_Tp, _Allocator>, _Allocator,
55 __gnu_debug::_Safe_node_sequence>,
56 public _GLIBCXX_STD_C::list<_Tp, _Allocator>
58 typedef _GLIBCXX_STD_C::list<_Tp, _Allocator>
_Base;
67 template<
typename _ItT,
typename _SeqT,
typename _CatT>
68 friend class ::__gnu_debug::_Safe_iterator;
75 _Base_ref(
const _Base& __r) : _M_ref(__r) { }
81 typedef typename _Base::reference reference;
82 typedef typename _Base::const_reference const_reference;
89 typedef typename _Base::size_type size_type;
90 typedef typename _Base::difference_type difference_type;
92 typedef _Tp value_type;
93 typedef _Allocator allocator_type;
94 typedef typename _Base::pointer pointer;
95 typedef typename _Base::const_pointer const_pointer;
101 #if __cplusplus < 201103L 105 list(
const list& __x)
111 list(
const list&) =
default;
112 list(list&&) =
default;
115 const allocator_type& __a = allocator_type())
116 : _Base(__l, __a) { }
120 list(
const list& __x,
const __type_identity_t<allocator_type>& __a)
121 : _Base(__x, __a) { }
123 list(list&& __x,
const __type_identity_t<allocator_type>& __a)
126 _Base,
const allocator_type&>::value )
132 list(
const _Allocator& __a) _GLIBCXX_NOEXCEPT
135 #if __cplusplus >= 201103L 137 list(size_type __n,
const allocator_type& __a = allocator_type())
138 : _Base(__n, __a) { }
140 list(size_type __n,
const __type_identity_t<_Tp>& __value,
141 const _Allocator& __a = _Allocator())
142 : _Base(__n, __value, __a) { }
145 list(size_type __n,
const _Tp& __value = _Tp(),
146 const _Allocator& __a = _Allocator())
147 : _Base(__n, __value, __a) { }
150 #if __cplusplus >= 201103L 151 template<
class _InputIterator,
152 typename = std::_RequireInputIter<_InputIterator>>
154 template<
class _InputIterator>
156 list(_InputIterator __first, _InputIterator __last,
157 const _Allocator& __a = _Allocator())
159 __glibcxx_check_valid_constructor_range(__first, __last)),
163 #if __glibcxx_containers_ranges // C++ >= 23 164 template<__detail::__container_compatible_range<_Tp> _Rg>
165 list(from_range_t, _Rg&& __rg,
const _Allocator& __a = _Allocator())
171 : _Base(__x._M_ref) { }
173 #if __cplusplus >= 201103L 175 operator=(
const list&) =
default;
178 operator=(list&&) =
default;
183 this->_M_invalidate_all();
184 _Base::operator=(__l);
192 this->_M_invalidate_all();
196 #if __cplusplus >= 201103L 197 template<
class _InputIterator,
198 typename = std::_RequireInputIter<_InputIterator>>
200 template<
class _InputIterator>
203 assign(_InputIterator __first, _InputIterator __last)
206 __glibcxx_check_valid_range2(__first, __last, __dist);
208 if (__dist.
second >= __gnu_debug::__dp_sign)
209 _Base::assign(__gnu_debug::__unsafe(__first),
210 __gnu_debug::__unsafe(__last));
212 _Base::assign(__first, __last);
214 this->_M_invalidate_all();
217 #if __glibcxx_containers_ranges // C++ >= 23 218 template<__detail::__container_compatible_range<_Tp> _Rg>
220 assign_range(_Rg&& __rg)
227 auto __first1 = _Base::begin();
228 const auto __last1 = _Base::end();
229 auto __first2 = ranges::begin(__rg);
230 const auto __last2 = ranges::end(__rg);
231 for (; __first1 != __last1 && __first2 != __last2;
232 ++__first1, (void)++__first2)
233 *__first1 = *__first2;
234 if (__first2 == __last2)
235 erase(const_iterator(__first1,
this),
236 const_iterator(__last1,
this));
238 _Base::insert_range(__last1,
239 ranges::subrange(
std::move(__first2), __last2));
244 assign(size_type __n,
const _Tp& __t)
246 _Base::assign(__n, __t);
247 this->_M_invalidate_all();
250 using _Base::get_allocator;
255 begin() _GLIBCXX_NOEXCEPT
256 {
return iterator(_Base::begin(),
this); }
260 begin() const _GLIBCXX_NOEXCEPT
261 {
return const_iterator(_Base::begin(),
this); }
265 end() _GLIBCXX_NOEXCEPT
266 {
return iterator(_Base::end(),
this); }
270 end() const _GLIBCXX_NOEXCEPT
271 {
return const_iterator(_Base::end(),
this); }
275 rbegin() _GLIBCXX_NOEXCEPT
276 {
return reverse_iterator(
end()); }
279 const_reverse_iterator
280 rbegin() const _GLIBCXX_NOEXCEPT
281 {
return const_reverse_iterator(
end()); }
285 rend() _GLIBCXX_NOEXCEPT
286 {
return reverse_iterator(
begin()); }
289 const_reverse_iterator
290 rend() const _GLIBCXX_NOEXCEPT
291 {
return const_reverse_iterator(
begin()); }
293 #if __cplusplus >= 201103L 297 {
return const_iterator(_Base::begin(),
this); }
301 cend() const noexcept
302 {
return const_iterator(_Base::end(),
this); }
305 const_reverse_iterator
307 {
return const_reverse_iterator(
end()); }
310 const_reverse_iterator
311 crend() const noexcept
312 {
return const_reverse_iterator(
begin()); }
318 using _Base::max_size;
320 #if __cplusplus >= 201103L 322 resize(size_type __sz)
324 const list* __this =
this;
328 _Base_iterator __victim = _Base::begin();
329 _Base_iterator __end = _Base::end();
330 for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
333 for (; __victim != __end; ++__victim)
334 this->_M_invalidate_if(_Equal(__victim));
343 __throw_exception_again;
348 resize(size_type __sz,
const _Tp& __c)
350 const list* __this =
this;
354 _Base_iterator __victim = _Base::begin();
355 _Base_iterator __end = _Base::end();
356 for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
359 for (; __victim != __end; ++__victim)
360 this->_M_invalidate_if(_Equal(__victim));
364 _Base::resize(__sz, __c);
369 __throw_exception_again;
374 resize(size_type __sz, _Tp __c = _Tp())
376 const list* __this =
this;
380 _Base_iterator __victim = _Base::begin();
381 _Base_iterator __end = _Base::end();
382 for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
385 for (; __victim != __end; ++__victim)
386 this->_M_invalidate_if(_Equal(__victim));
390 _Base::resize(__sz, __c);
395 __throw_exception_again;
403 front() _GLIBCXX_NOEXCEPT
405 __glibcxx_check_nonempty();
406 return _Base::front();
411 front() const _GLIBCXX_NOEXCEPT
413 __glibcxx_check_nonempty();
414 return _Base::front();
419 back() _GLIBCXX_NOEXCEPT
421 __glibcxx_check_nonempty();
422 return _Base::back();
427 back() const _GLIBCXX_NOEXCEPT
429 __glibcxx_check_nonempty();
430 return _Base::back();
434 using _Base::push_front;
436 #if __cplusplus >= 201103L 437 using _Base::emplace_front;
440 #if __glibcxx_containers_ranges // C++ >= 23 441 using _Base::prepend_range;
442 using _Base::append_range;
446 pop_front() _GLIBCXX_NOEXCEPT
448 __glibcxx_check_nonempty();
449 this->_M_invalidate_if(_Equal(_Base::begin()));
453 using _Base::push_back;
455 #if __cplusplus >= 201103L 456 using _Base::emplace_back;
460 pop_back() _GLIBCXX_NOEXCEPT
462 __glibcxx_check_nonempty();
463 this->_M_invalidate_if(_Equal(--_Base::end()));
467 #if __cplusplus >= 201103L 468 template<
typename... _Args>
470 emplace(const_iterator __position, _Args&&... __args)
473 return { _Base::emplace(__position.
base(),
474 std::forward<_Args>(__args)...),
this };
479 #if __cplusplus >= 201103L 480 insert(const_iterator __position,
const _Tp& __x)
482 insert(iterator __position,
const _Tp& __x)
486 return iterator(_Base::insert(__position.
base(), __x),
this);
489 #if __cplusplus >= 201103L 491 insert(const_iterator __position, _Tp&& __x)
492 {
return emplace(__position,
std::move(__x)); }
498 return { _Base::insert(__p.
base(), __l),
this };
502 #if __cplusplus >= 201103L 504 insert(const_iterator __position, size_type __n,
const _Tp& __x)
507 return { _Base::insert(__position.
base(), __n, __x),
this };
511 insert(iterator __position, size_type __n,
const _Tp& __x)
514 _Base::insert(__position.
base(), __n, __x);
518 #if __cplusplus >= 201103L 519 template<
class _InputIterator,
520 typename = std::_RequireInputIter<_InputIterator>>
522 insert(const_iterator __position, _InputIterator __first,
523 _InputIterator __last)
527 if (__dist.
second >= __gnu_debug::__dp_sign)
530 _Base::insert(__position.
base(),
531 __gnu_debug::__unsafe(__first),
532 __gnu_debug::__unsafe(__last)),
536 return { _Base::insert(__position.
base(), __first, __last),
this };
539 template<
class _InputIterator>
541 insert(iterator __position, _InputIterator __first,
542 _InputIterator __last)
547 if (__dist.
second >= __gnu_debug::__dp_sign)
548 _Base::insert(__position.
base(), __gnu_debug::__unsafe(__first),
549 __gnu_debug::__unsafe(__last));
551 _Base::insert(__position.
base(), __first, __last);
555 #if __glibcxx_containers_ranges // C++ >= 23 556 template<__detail::__container_compatible_range<_Tp> _Rg>
558 insert_range(const_iterator __position, _Rg&& __rg)
560 auto __ret = _Base::insert_range(__position.
base(),
561 std::forward<_Rg>(__rg));
562 return { __ret,
this };
568 #if __cplusplus >= 201103L 569 _M_erase(_Base_const_iterator __position) noexcept
571 _M_erase(_Base_iterator __position)
574 this->_M_invalidate_if(_Equal(__position));
575 return _Base::erase(__position);
580 #if __cplusplus >= 201103L 581 erase(const_iterator __position) noexcept
583 erase(iterator __position)
587 return iterator(_M_erase(__position.
base()),
this);
591 #if __cplusplus >= 201103L 592 erase(const_iterator __first, const_iterator __last) noexcept
594 erase(iterator __first, iterator __last)
600 for (_Base_const_iterator __victim = __first.
base();
601 __victim != __last.
base(); ++__victim)
603 _GLIBCXX_DEBUG_VERIFY(__victim != _Base::end(),
604 _M_message(__gnu_debug::__msg_valid_range)
605 ._M_iterator(__first,
"position")
606 ._M_iterator(__last,
"last"));
607 this->_M_invalidate_if(_Equal(__victim));
610 return iterator(_Base::erase(__first.
base(), __last.
base()),
this);
615 _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) )
622 clear() _GLIBCXX_NOEXCEPT
625 this->_M_invalidate_all();
630 #if __cplusplus >= 201103L 631 splice(const_iterator __position, list&& __x) noexcept
633 splice(iterator __position, list& __x)
637 _M_message(__gnu_debug::__msg_self_splice)
638 ._M_sequence(*
this,
"this"));
639 this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
640 _Base::splice(__position.
base(), _GLIBCXX_MOVE(__x));
643 #if __cplusplus >= 201103L 645 splice(const_iterator __position, list& __x) noexcept
650 #if __cplusplus >= 201103L 651 splice(const_iterator __position, list&& __x, const_iterator __i) noexcept
653 splice(iterator __position, list& __x, iterator __i)
662 _M_message(__gnu_debug::__msg_splice_bad)
663 ._M_iterator(__i,
"__i"));
665 _M_message(__gnu_debug::__msg_splice_other)
666 ._M_iterator(__i,
"__i")._M_sequence(__x,
"__x"));
670 this->_M_transfer_from_if(__x, _Equal(__i.
base()));
671 _Base::splice(__position.
base(), _GLIBCXX_MOVE(__x),
675 #if __cplusplus >= 201103L 677 splice(const_iterator __position, list& __x, const_iterator __i) noexcept
678 { splice(__position,
std::move(__x), __i); }
682 #if __cplusplus >= 201103L 683 splice(const_iterator __position, list&& __x, const_iterator __first,
684 const_iterator __last) noexcept
686 splice(iterator __position, list& __x, iterator __first,
691 __glibcxx_check_valid_range(__first, __last);
693 _M_message(__gnu_debug::__msg_splice_other)
694 ._M_sequence(__x,
"x")
695 ._M_iterator(__first,
"first"));
700 for (_Base_const_iterator __tmp = __first.
base();
701 __tmp != __last.
base(); ++__tmp)
703 _GLIBCXX_DEBUG_VERIFY(__tmp != _Base::end(),
704 _M_message(__gnu_debug::__msg_valid_range)
705 ._M_iterator(__first,
"first")
706 ._M_iterator(__last,
"last"));
708 || __tmp != __position.
base(),
709 _M_message(__gnu_debug::__msg_splice_overlap)
710 ._M_iterator(__tmp,
"position")
711 ._M_iterator(__first,
"first")
712 ._M_iterator(__last,
"last"));
716 this->_M_transfer_from_if(__x, _Equal(__tmp));
719 _Base::splice(__position.
base(), _GLIBCXX_MOVE(__x),
723 #if __cplusplus >= 201103L 725 splice(const_iterator __position, list& __x,
726 const_iterator __first, const_iterator __last) noexcept
727 { splice(__position,
std::move(__x), __first, __last); }
731 #if __cplusplus > 201703L 732 typedef size_type __remove_return_type;
733 # define _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG \ 734 __attribute__((__abi_tag__("__cxx20"))) 735 # define _GLIBCXX20_ONLY(__expr) __expr 737 typedef void __remove_return_type;
738 # define _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG 739 # define _GLIBCXX20_ONLY(__expr) 743 _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG
745 remove(
const _Tp& __value)
747 if (!this->_M_iterators && !this->_M_const_iterators)
748 return _Base::remove(__value);
750 #if !_GLIBCXX_USE_CXX11_ABI 751 size_type __removed __attribute__((__unused__)) = 0;
753 _Base __to_destroy(get_allocator());
754 _Base_iterator __first = _Base::begin();
755 _Base_iterator __last = _Base::end();
756 while (__first != __last)
758 _Base_iterator __next = __first;
760 if (*__first == __value)
765 this->_M_invalidate_if(_Equal(__first));
766 __to_destroy.splice(__to_destroy.begin(), *
this, __first);
767 #if !_GLIBCXX_USE_CXX11_ABI 768 _GLIBCXX20_ONLY( __removed++ );
775 #if !_GLIBCXX_USE_CXX11_ABI 776 return _GLIBCXX20_ONLY( __removed );
778 return _GLIBCXX20_ONLY( __to_destroy.size() );
782 template<
class _Predicate>
784 remove_if(_Predicate __pred)
786 if (!this->_M_iterators && !this->_M_const_iterators)
787 return _Base::remove_if(__pred);
789 #if !_GLIBCXX_USE_CXX11_ABI 790 size_type __removed __attribute__((__unused__)) = 0;
792 _Base __to_destroy(get_allocator());
793 for (_Base_iterator __x = _Base::begin(); __x != _Base::end(); )
795 _Base_iterator __next = __x;
799 this->_M_invalidate_if(_Equal(__x));
800 __to_destroy.splice(__to_destroy.begin(), *
this, __x);
801 #if !_GLIBCXX_USE_CXX11_ABI 802 _GLIBCXX20_ONLY( __removed++ );
809 #if !_GLIBCXX_USE_CXX11_ABI 810 return _GLIBCXX20_ONLY( __removed );
812 return _GLIBCXX20_ONLY( __to_destroy.size() );
816 _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG
820 if (!this->_M_iterators && !this->_M_const_iterators)
821 return _Base::unique();
824 return _GLIBCXX20_ONLY(0);
826 #if !_GLIBCXX_USE_CXX11_ABI 827 size_type __removed __attribute__((__unused__)) = 0;
829 _Base __to_destroy(get_allocator());
830 _Base_iterator __first = _Base::begin();
831 _Base_iterator __last = _Base::end();
832 _Base_iterator __next = __first;
833 while (++__next != __last)
834 if (*__first == *__next)
836 this->_M_invalidate_if(_Equal(__next));
837 __to_destroy.splice(__to_destroy.begin(), *
this, __next);
839 #if !_GLIBCXX_USE_CXX11_ABI 840 _GLIBCXX20_ONLY( __removed++ );
846 #if !_GLIBCXX_USE_CXX11_ABI 847 return _GLIBCXX20_ONLY( __removed );
849 return _GLIBCXX20_ONLY( __to_destroy.size() );
853 template<
class _BinaryPredicate>
855 unique(_BinaryPredicate __binary_pred)
857 if (!this->_M_iterators && !this->_M_const_iterators)
858 return _Base::unique(__binary_pred);
861 return _GLIBCXX20_ONLY(0);
864 #if !_GLIBCXX_USE_CXX11_ABI 865 size_type __removed __attribute__((__unused__)) = 0;
867 _Base __to_destroy(get_allocator());
868 _Base_iterator __first = _Base::begin();
869 _Base_iterator __last = _Base::end();
870 _Base_iterator __next = __first;
871 while (++__next != __last)
872 if (__binary_pred(*__first, *__next))
874 this->_M_invalidate_if(_Equal(__next));
875 __to_destroy.splice(__to_destroy.begin(), *
this, __next);
877 #if !_GLIBCXX_USE_CXX11_ABI 878 _GLIBCXX20_ONLY( __removed++ );
884 #if !_GLIBCXX_USE_CXX11_ABI 885 return _GLIBCXX20_ONLY( __removed );
887 return _GLIBCXX20_ONLY( __to_destroy.size() );
891 #undef _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG 892 #undef _GLIBCXX20_ONLY 895 #if __cplusplus >= 201103L 905 __glibcxx_check_sorted(_Base::begin(), _Base::end());
906 __glibcxx_check_sorted(__x.begin().
base(), __x.end().
base());
907 this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
908 _Base::merge(_GLIBCXX_MOVE(__x));
912 #if __cplusplus >= 201103L 918 template<
class _Compare>
920 #if __cplusplus >= 201103L 921 merge(list&& __x, _Compare __comp)
923 merge(list& __x, _Compare __comp)
934 this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
935 _Base::merge(_GLIBCXX_MOVE(__x), __comp);
939 #if __cplusplus >= 201103L 940 template<
typename _Compare>
942 merge(list& __x, _Compare __comp)
947 sort() { _Base::sort(); }
949 template<
typename _StrictWeakOrdering>
951 sort(_StrictWeakOrdering __pred) { _Base::sort(__pred); }
953 using _Base::reverse;
956 _M_base() _GLIBCXX_NOEXCEPT {
return *
this; }
959 _M_base() const _GLIBCXX_NOEXCEPT {
return *
this; }
962 #if __cpp_deduction_guides >= 201606 963 template<
typename _InputIterator,
typename _ValT
966 typename = _RequireInputIter<_InputIterator>,
967 typename = _RequireAllocator<_Allocator>>
968 list(_InputIterator, _InputIterator, _Allocator = _Allocator())
971 template<
typename _Tp,
typename _Allocator = allocator<_Tp>,
972 typename = _RequireAllocator<_Allocator>>
973 list(
size_t, _Tp, _Allocator = _Allocator())
976 #if __glibcxx_containers_ranges // C++ >= 23 977 template<ranges::input_range _Rg,
979 list(from_range_t, _Rg&&, _Allocator = _Allocator())
984 template<
typename _Tp,
typename _Alloc>
988 {
return __lhs._M_base() == __rhs._M_base(); }
990 #if __cpp_lib_three_way_comparison 991 template<
typename _Tp,
typename _Alloc>
992 constexpr __detail::__synth3way_t<_Tp>
994 {
return __x._M_base() <=> __y._M_base(); }
996 template<
typename _Tp,
typename _Alloc>
1000 {
return __lhs._M_base() != __rhs._M_base(); }
1002 template<
typename _Tp,
typename _Alloc>
1004 operator<(const list<_Tp, _Alloc>& __lhs,
1006 {
return __lhs._M_base() < __rhs._M_base(); }
1008 template<
typename _Tp,
typename _Alloc>
1010 operator<=(const list<_Tp, _Alloc>& __lhs,
1012 {
return __lhs._M_base() <= __rhs._M_base(); }
1014 template<
typename _Tp,
typename _Alloc>
1018 {
return __lhs._M_base() >= __rhs._M_base(); }
1020 template<
typename _Tp,
typename _Alloc>
1024 {
return __lhs._M_base() > __rhs._M_base(); }
1025 #endif // three-way comparison 1027 template<
typename _Tp,
typename _Alloc>
1030 _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs)))
1031 { __lhs.swap(__rhs); }
1035 #ifdef __glibcxx_erase_if // C++ >= 20 && HOSTED 1036 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1037 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
1038 inline typename __debug::list<_Tp, _Alloc>::size_type
1040 {
return __cont.remove_if(__pred); }
1042 template<
typename _Tp,
typename _Alloc,
1043 typename _Up _GLIBCXX26_DEF_VAL_T(_Tp)>
1044 inline typename __debug::list<_Tp, _Alloc>::size_type
1049 return std::erase_if(__cont, [&](
const auto& __elem) ->
bool {
1050 return __elem == __value;
1053 _GLIBCXX_END_NAMESPACE_VERSION
1054 #endif // __glibcxx_erase_if 1059 #ifndef _GLIBCXX_USE_CXX11_ABI 1061 template<
typename _Tp,
typename _Alloc>
1066 static typename _Distance_traits<_It>::__type
1069 return __seq.empty()
1070 ? std::make_pair(0, __dp_exact) :
std::make_pair(1, __dp_sign);
1075 #ifndef _GLIBCXX_DEBUG_PEDANTIC 1076 template<
class _Tp,
class _Alloc>
1078 {
enum { __value = 1 }; };
#define __glibcxx_check_erase_range(_First, _Last)
bool _M_dereferenceable() const
Is the iterator dereferenceable?
Class std::list with safety/checking/debug instrumentation.
#define __glibcxx_check_erase(_Position)
constexpr auto empty(const _Container &__cont) noexcept(noexcept(__cont.empty())) -> decltype(__cont.empty())
Return whether a container is empty.
#define __glibcxx_check_insert(_Position)
void _M_revalidate_singular() const
ISO C++ entities toplevel namespace is std.
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.
#define __glibcxx_check_sorted_pred(_First, _Last, _Pred)
GNU debug classes for public use.
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
Struct holding two objects of arbitrary type.
constexpr auto crbegin(const _Container &__cont) noexcept(noexcept(std::rbegin(__cont))) -> decltype(std::rbegin(__cont))
Return a reverse iterator pointing to the last element of the const container.
Safe class dealing with some allocator dependent operations.
concept assignable_from
[concept.assignable], concept assignable_from
constexpr auto cend(const _Container &__cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont))
Return an iterator pointing to one past the last element of the const container.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
#define __glibcxx_check_insert_range(_Position, _First, _Last, _Dist)
constexpr _Iterator & base() noexcept
Return the underlying iterator.
Like _Safe_sequence but with a special _M_invalidate_all implementation not invalidating past-the-end...
The standard allocator, as per C++03 [20.4.1].
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
_T2 second
The second member.
constexpr auto crend(const _Container &__cont) noexcept(noexcept(std::rend(__cont))) -> decltype(std::rend(__cont))
Return a reverse iterator pointing one past the first element of the const container.
constexpr _Iterator __base(_Iterator __it)
constexpr auto rend(_Container &__cont) noexcept(noexcept(__cont.rend())) -> decltype(__cont.rend())
Return a reverse iterator pointing one past the first element of the container.
constexpr auto rbegin(_Container &__cont) noexcept(noexcept(__cont.rbegin())) -> decltype(__cont.rbegin())
Return a reverse iterator pointing to the last element of the container.
bool _M_attached_to(const _Safe_sequence_base *__seq) const
Traits class for iterators.
void _M_detach_singular() const
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.