29#ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_H
30#define _GLIBCXX_DEBUG_SAFE_ITERATOR_H 1
38#if __cplusplus > 201703L
42#define _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, _BadMsgId, _DiffMsgId) \
43 if (!std::__is_constant_evaluated()) { \
44 _GLIBCXX_DEBUG_VERIFY((!_Lhs._M_singular() && !_Rhs._M_singular()) \
45 || (_Lhs._M_value_initialized() \
46 && _Rhs._M_value_initialized()), \
47 _M_message(_BadMsgId) \
48 ._M_iterator(_Lhs, #_Lhs) \
49 ._M_iterator(_Rhs, #_Rhs)); \
50 _GLIBCXX_DEBUG_VERIFY(_Lhs._M_can_compare(_Rhs), \
51 _M_message(_DiffMsgId) \
52 ._M_iterator(_Lhs, #_Lhs) \
53 ._M_iterator(_Rhs, #_Rhs)); \
56#define _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS(_Lhs, _Rhs) \
57 _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, __msg_iter_compare_bad, \
58 __msg_compare_different)
60#define _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(_Lhs, _Rhs) \
61 _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, __msg_iter_order_bad, \
62 __msg_order_different)
64#define _GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS(_Lhs, _Rhs) \
65 _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, __msg_distance_bad, \
66 __msg_distance_different)
74#if __cplusplus >= 202002L && __cpp_constexpr < 202110L
75# define _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN [&]() -> void
76# define _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END ();
78# define _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN
79# define _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
87 template<
typename _Sequence>
90 template<
typename _Iterator,
typename _Category>
95 template<
typename _Iterator,
typename _Category>
98 {
return __it.
base() == __it._M_get_sequence()->_M_base().begin(); }
102 template<
typename _Sequence>
105 typedef _Distance_traits<typename _Sequence::iterator> _DistTraits;
107 static typename _DistTraits::__type
108 _S_size(
const _Sequence& __seq)
128 template<
typename _Iterator,
typename _Sequence,
typename _Category
137 typedef std::__are_same<
typename _Sequence::_Base::const_iterator,
138 _Iterator> _IsConstant;
140 typedef typename __gnu_cxx::__conditional_type<
141 _IsConstant::__value,
142 typename _Sequence::_Base::iterator,
143 typename _Sequence::_Base::const_iterator>::__type _OtherIterator;
145 struct _Unchecked { };
148 _Safe_iterator(
const _Safe_iterator& __x, _Unchecked) _GLIBCXX_NOEXCEPT
153 typedef _Iterator iterator_type;
154 typedef typename _Traits::iterator_category iterator_category;
155 typedef typename _Traits::value_type value_type;
156 typedef typename _Traits::difference_type difference_type;
157 typedef typename _Traits::reference reference;
158 typedef typename _Traits::pointer pointer;
160#if __cplusplus > 201703L && __cpp_lib_concepts
161 using iterator_concept = std::__detail::__iter_concept<_Iterator>;
188 if (std::__is_constant_evaluated())
195 _M_message(__msg_init_copy_singular)
196 ._M_iterator(*
this,
"this")
197 ._M_iterator(__x,
"other"));
201#if __cplusplus >= 201103L
210 if (std::__is_constant_evaluated())
218 _M_message(__msg_init_copy_singular)
219 ._M_iterator(*
this,
"this")
220 ._M_iterator(__x,
"other"));
221 const _Safe_sequence_base* __seq = __x.
_M_sequence;
232 template<
typename _MutableIterator>
235 const _Safe_iterator<_MutableIterator, _Sequence,
236 typename __gnu_cxx::__enable_if<_IsConstant::__value &&
237 std::__are_same<_MutableIterator, _OtherIterator>::__value,
238 _Category>::__type>& __x)
240 : _Iterator(__x.
base())
242 if (std::__is_constant_evaluated())
249 _M_message(__msg_init_const_singular)
250 ._M_iterator(*
this,
"this")
251 ._M_iterator(__x,
"other"));
262 if (std::__is_constant_evaluated())
272 _M_message(__msg_copy_singular)
273 ._M_iterator(*
this,
"this")
274 ._M_iterator(__x,
"other"));
277 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
281 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
292#if __cplusplus >= 201103L
301 if (std::__is_constant_evaluated())
309 _M_message(__msg_copy_singular)
310 ._M_iterator(*
this,
"this")
311 ._M_iterator(__x,
"other"));
317 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
321 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
330 __x.
base() = _Iterator();
344 if (!std::__is_constant_evaluated())
347 _M_message(__msg_bad_deref)
348 ._M_iterator(*
this,
"this"));
362 if (!std::__is_constant_evaluated())
365 _M_message(__msg_bad_deref)
366 ._M_iterator(*
this,
"this"));
368 return base().operator->();
380 if (std::__is_constant_evaluated())
387 _M_message(__msg_bad_inc)
388 ._M_iterator(*
this,
"this"));
389 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
392 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
404 if (!std::__is_constant_evaluated())
407 _M_message(__msg_bad_inc)
408 ._M_iterator(*
this,
"this"));
410 _Safe_iterator __ret(*
this, _Unchecked());
418 static _GLIBCXX_CONSTEXPR
bool
420 {
return _IsConstant::__value; }
427 base() _GLIBCXX_NOEXCEPT {
return *
this; }
431 base() const _GLIBCXX_NOEXCEPT {
return *
this; }
438 operator _Iterator() const _GLIBCXX_NOEXCEPT {
return *
this; }
462 return ++
__base != _M_get_sequence()->_M_base().end();
479 _M_can_advance(difference_type __n,
bool __strict =
false)
const;
482 template<
typename _Diff>
491 bool __check_dereferenceable =
true)
const;
494 typename __gnu_cxx::__conditional_type<
495 _IsConstant::__value,
const _Sequence*, _Sequence*>::__type
496 _M_get_sequence()
const
501 return static_cast<_Sequence*
>
506 typename _Distance_traits<_Iterator>::__type
510 typename _Distance_traits<_Iterator>::__type
511 _M_get_distance_from_begin()
const;
514 typename _Distance_traits<_Iterator>::__type
515 _M_get_distance_to_end()
const;
521 {
return base() == _M_get_sequence()->_M_base().begin(); }
526 {
return base() == _M_get_sequence()->_M_base().end(); }
532 {
return _BeforeBeginHelper<_Sequence>::_S_Is(*
this); }
538 {
return _BeforeBeginHelper<_Sequence>::_S_Is_Beginnest(*
this); }
547 operator==(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
549 _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS(__lhs, __rhs);
550 return __lhs.base() == __rhs.base();
553 template<
typename _IteR>
557 operator==(
const _Self& __lhs,
561 _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS(__lhs, __rhs);
562 return __lhs.base() == __rhs.base();
565#if ! __cpp_lib_three_way_comparison
568 operator!=(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
570 _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS(__lhs, __rhs);
571 return __lhs.base() != __rhs.base();
574 template<
typename _IteR>
577 operator!=(
const _Self& __lhs,
578 const _Safe_iterator<_IteR, _Sequence, iterator_category>& __rhs)
581 _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS(__lhs, __rhs);
582 return __lhs.base() != __rhs.base();
586 template<
typename _Fn>
587 static _GLIBCXX14_CONSTEXPR _Self
588 _S_for_each_segment(_Self __first, _Self __last, _Fn __func)
590 __glibcxx_check_valid_range(__first, __last);
592 = _Iterator::_S_for_each_segment(__first.base(), __last.base(), __func);
593 return _Self(__ret, __first._M_sequence);
596 static const bool _S_enable_for_each_segment
597 = std::__enable_for_each_segment<_Iterator>;
600 template<
typename _Iterator,
typename _Sequence>
601 class _Safe_iterator<_Iterator, _Sequence, std::bidirectional_iterator_tag>
602 :
public _Safe_iterator<_Iterator, _Sequence, std::forward_iterator_tag>
604 typedef _Safe_iterator<_Iterator, _Sequence,
605 std::forward_iterator_tag> _Safe_base;
608 typedef typename _Safe_base::_OtherIterator _OtherIterator;
610 typedef typename _Safe_base::_Unchecked _Unchecked;
614 _Unchecked __unchecked) _GLIBCXX_NOEXCEPT
615 : _Safe_base(__x, __unchecked)
633 : _Safe_base(__i, __seq)
644#if __cplusplus >= 201103L
654 template<
typename _MutableIterator>
657 const _Safe_iterator<_MutableIterator, _Sequence,
658 typename __gnu_cxx::__enable_if<_Safe_base::_IsConstant::__value &&
659 std::__are_same<_MutableIterator, _OtherIterator>::__value,
660 std::bidirectional_iterator_tag>::__type>& __x)
665#if __cplusplus >= 201103L
668 operator=(
const _Safe_iterator&) =
default;
678 _Safe_base::operator=(__x);
692 _Safe_base::operator++();
704 _M_message(__msg_bad_inc)
705 ._M_iterator(*
this,
"this"));
706 _Safe_iterator __ret(*
this, _Unchecked());
718 operator--() _GLIBCXX_NOEXCEPT
720 if (std::__is_constant_evaluated())
726 _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
727 _M_message(__msg_bad_dec)
728 ._M_iterator(*
this,
"this"));
729 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
732 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
741 operator--(
int) _GLIBCXX_NOEXCEPT
743 _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
744 _M_message(__msg_bad_dec)
745 ._M_iterator(*
this,
"this"));
746 _Safe_iterator __ret(*
this, _Unchecked());
755 _M_decrementable()
const
759 template<
typename _Iterator,
typename _Sequence>
760 class _Safe_iterator<_Iterator, _Sequence, std::random_access_iterator_tag>
762 std::bidirectional_iterator_tag>
764 typedef _Safe_iterator<_Iterator, _Sequence,
765 std::bidirectional_iterator_tag> _Safe_base;
766 typedef typename _Safe_base::_OtherIterator _OtherIterator;
768 typedef typename _Safe_base::_Self _Self;
769 typedef _Safe_iterator<_OtherIterator, _Sequence,
770 std::random_access_iterator_tag> _OtherSelf;
772 typedef typename _Safe_base::_Unchecked _Unchecked;
776 _Unchecked __unchecked) _GLIBCXX_NOEXCEPT
777 : _Safe_base(__x, __unchecked)
781 typedef typename _Safe_base::difference_type difference_type;
782 typedef typename _Safe_base::reference reference;
798 : _Safe_base(__i, __seq)
809#if __cplusplus >= 201103L
818 template<
typename _MutableIterator>
821 const _Safe_iterator<_MutableIterator, _Sequence,
822 typename __gnu_cxx::__enable_if<_Safe_base::_IsConstant::__value &&
823 std::__are_same<_MutableIterator, _OtherIterator>::__value,
824 std::random_access_iterator_tag>::__type>& __x)
829#if __cplusplus >= 201103L
832 operator=(
const _Safe_iterator&) =
default;
842 _Safe_base::operator=(__x);
849 _M_valid_range(
const _Safe_iterator& __rhs,
862 _Safe_base::operator++();
874 if (!std::__is_constant_evaluated())
877 _M_message(__msg_bad_inc)
878 ._M_iterator(*
this,
"this"));
880 _Safe_iterator __ret(*
this, _Unchecked());
892 operator--() _GLIBCXX_NOEXCEPT
894 _Safe_base::operator--();
904 operator--(
int) _GLIBCXX_NOEXCEPT
906 if (!std::__is_constant_evaluated())
908 _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
909 _M_message(__msg_bad_dec)
910 ._M_iterator(*
this,
"this"));
912 _Safe_iterator __ret(*
this, _Unchecked());
921 operator[](difference_type __n)
const _GLIBCXX_NOEXCEPT
923 if (!std::__is_constant_evaluated())
925 _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n)
926 && this->_M_can_advance(__n + 1),
927 _M_message(__msg_iter_subscript_oob)
928 ._M_iterator(*this)._M_integer(__n));
930 return this->
base()[__n];
935 operator+=(difference_type __n) _GLIBCXX_NOEXCEPT
937 if (std::__is_constant_evaluated())
943 _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n),
944 _M_message(__msg_advance_oob)
945 ._M_iterator(*this)._M_integer(__n));
946 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
949 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
955 operator-=(difference_type __n) _GLIBCXX_NOEXCEPT
957 if (std::__is_constant_evaluated())
963 _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(-__n),
964 _M_message(__msg_retreat_oob)
965 ._M_iterator(*this)._M_integer(__n));
966 _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN {
969 } _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
973#if __cpp_lib_three_way_comparison
977 operator<=>(
const _Self& __lhs,
const _Self& __rhs)
noexcept
979 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
980 return __lhs.base() <=> __rhs.base();
986 operator<=>(
const _Self& __lhs,
const _OtherSelf& __rhs)
noexcept
988 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
989 return __lhs.base() <=> __rhs.base();
994 operator<(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
996 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
997 return __lhs.base() < __rhs.base();
1002 operator<(
const _Self& __lhs,
const _OtherSelf& __rhs) _GLIBCXX_NOEXCEPT
1004 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1005 return __lhs.base() < __rhs.base();
1010 operator<=(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
1012 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1013 return __lhs.base() <= __rhs.base();
1018 operator<=(
const _Self& __lhs,
const _OtherSelf& __rhs) _GLIBCXX_NOEXCEPT
1020 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1021 return __lhs.base() <= __rhs.base();
1026 operator>(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
1028 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1029 return __lhs.base() > __rhs.base();
1034 operator>(
const _Self& __lhs,
const _OtherSelf& __rhs) _GLIBCXX_NOEXCEPT
1036 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1037 return __lhs.base() > __rhs.base();
1042 operator>=(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
1044 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1045 return __lhs.base() >= __rhs.base();
1050 operator>=(
const _Self& __lhs,
const _OtherSelf& __rhs) _GLIBCXX_NOEXCEPT
1052 _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS(__lhs, __rhs);
1053 return __lhs.base() >= __rhs.base();
1062 _GLIBCXX20_CONSTEXPR
1063 friend difference_type
1064 operator-(
const _Self& __lhs,
const _OtherSelf& __rhs) _GLIBCXX_NOEXCEPT
1066 _GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS(__lhs, __rhs);
1067 return __lhs.base() - __rhs.base();
1071 _GLIBCXX20_CONSTEXPR
1072 friend difference_type
1073 operator-(
const _Self& __lhs,
const _Self& __rhs) _GLIBCXX_NOEXCEPT
1075 _GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS(__lhs, __rhs);
1076 return __lhs.base() - __rhs.base();
1080 _GLIBCXX20_CONSTEXPR
1082 operator+(
const _Self& __x, difference_type __n) _GLIBCXX_NOEXCEPT
1084 if (!std::__is_constant_evaluated())
1086 _GLIBCXX_DEBUG_VERIFY(__x._M_can_advance(__n),
1087 _M_message(__msg_advance_oob)
1088 ._M_iterator(__x)._M_integer(__n));
1094 _GLIBCXX20_CONSTEXPR
1096 operator+(difference_type __n,
const _Self& __x) _GLIBCXX_NOEXCEPT
1098 if (!std::__is_constant_evaluated())
1100 _GLIBCXX_DEBUG_VERIFY(__x._M_can_advance(__n),
1101 _M_message(__msg_advance_oob)
1102 ._M_iterator(__x)._M_integer(__n));
1108 _GLIBCXX20_CONSTEXPR
1110 operator-(
const _Self& __x, difference_type __n) _GLIBCXX_NOEXCEPT
1112 if (!std::__is_constant_evaluated())
1114 _GLIBCXX_DEBUG_VERIFY(__x._M_can_advance(-__n),
1115 _M_message(__msg_retreat_oob)
1116 ._M_iterator(__x)._M_integer(__n));
1123 template<
typename _Iterator,
typename _Sequence,
typename _Category>
1124 _GLIBCXX20_CONSTEXPR
1127 _Category>& __first,
1130 typename _Distance_traits<_Iterator>::__type& __dist)
1132 if (std::__is_constant_evaluated())
1135 return __first._M_valid_range(__last, __dist);
1138 template<
typename _Iterator,
typename _Sequence,
typename _Category>
1139 _GLIBCXX20_CONSTEXPR
1141 __valid_range(
const _Safe_iterator<_Iterator, _Sequence,
1142 _Category>& __first,
1143 const _Safe_iterator<_Iterator, _Sequence,
1146 if (std::__is_constant_evaluated())
1149 typename _Distance_traits<_Iterator>::__type __dist;
1150 return __first._M_valid_range(__last, __dist);
1153 template<
typename _Iterator,
typename _Sequence,
typename _Category,
1155 _GLIBCXX20_CONSTEXPR
1160 if (std::__is_constant_evaluated())
1163 return __it._M_can_advance(__n);
1166 template<
typename _Iterator,
typename _Sequence,
typename _Category,
1168 _GLIBCXX20_CONSTEXPR
1174 if (std::__is_constant_evaluated())
1177 return __it._M_can_advance(__dist, __way);
1180 template<
typename _Iterator,
typename _Sequence>
1181 _GLIBCXX20_CONSTEXPR _Iterator
1183 std::random_access_iterator_tag>& __it)
1184 {
return __it.base(); }
1186#if __cplusplus < 201103L
1187 template<
typename _Iterator,
typename _Sequence>
1189 {
typedef _Iterator _Type; };
1192 template<
typename _Iterator,
typename _Sequence>
1195 {
return __it.base(); }
1199#undef _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END
1200#undef _GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN
1201#undef _GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS
1202#undef _GLIBCXX_DEBUG_VERIFY_REL_OPERANDS
1203#undef _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS
1204#undef _GLIBCXX_DEBUG_VERIFY_OPERANDS
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 minus y.
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
pair(_T1, _T2) -> pair< _T1, _T2 >
Two pairs are equal iff their members are equal.
constexpr pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > make_pair(_T1 &&__x, _T2 &&__y)
A convenience wrapper for creating a pair from two objects.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
GNU debug classes for public use.
constexpr _Iterator __base(_Iterator __it)
bool _M_incrementable() const
Is the iterator incrementable?
void _M_attach_single(const _Safe_sequence_base *__seq)
constexpr _Iterator & base() noexcept
Return the underlying iterator.
bool _M_dereferenceable() const
Is the iterator dereferenceable?
constexpr bool _M_is_begin() const
Is this iterator equal to the sequence's begin() iterator?
constexpr _Safe_iterator(const _Safe_iterator< _MutableIterator, _Sequence, typename __gnu_cxx::__enable_if< _IsConstant::__value &&std::__are_same< _MutableIterator, _OtherIterator >::__value, _Category >::__type > &__x) noexcept
Converting constructor from a mutable iterator to a constant iterator.
constexpr _Safe_iterator & operator++() noexcept
Iterator preincrement.
void _M_attach(const _Safe_sequence_base *__seq)
bool _M_before_dereferenceable() const
Is the iterator before a dereferenceable one?
constexpr _Safe_iterator & operator=(_Safe_iterator &&__x) noexcept
Move assignment.
constexpr _Safe_iterator(_Iterator __i, const _Safe_sequence_base *__seq) noexcept
Safe iterator construction from an unsafe iterator and its sequence.
constexpr pointer operator->() const noexcept
Iterator dereference.
constexpr _Safe_iterator(const _Safe_iterator &__x) noexcept
Copy construction.
constexpr reference operator*() const noexcept
Iterator dereference.
constexpr _Safe_iterator() noexcept
bool _M_is_beginnest() const
Is this iterator equal to the sequence's before_begin() iterator if any or begin() otherwise?
bool _M_value_initialized() const
Is the iterator value-initialized?
bool _M_is_end() const
Is this iterator equal to the sequence's end() iterator?
constexpr _Safe_iterator operator++(int) noexcept
Iterator postincrement.
bool _M_is_before_begin() const
Is this iterator equal to the sequence's before_begin() iterator if any?
constexpr _Safe_iterator(_Safe_iterator &&__x) noexcept
Move construction.
static constexpr bool _S_constant()
Determine if this is a constant iterator.
constexpr _Safe_iterator & operator=(const _Safe_iterator &__x) noexcept
Copy assignment.
Traits class for iterators.
Struct holding two objects (or references) of arbitrary type.
bool _M_singular() const noexcept
__gnu_cxx::__mutex & _M_get_mutex() noexcept
constexpr _Safe_iterator_base()
const _Safe_sequence_base * _M_sequence
void _M_attach(const _Safe_sequence_base *__seq, bool __constant)
void _M_attach_single(const _Safe_sequence_base *__seq, bool __constant) noexcept
Base class that supports tracking of iterators that reference a sequence.
unsigned int _M_version
The container version number. This number may never be 0.