29 #ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC
30 #define _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC 1
34 template<
typename _Iterator,
typename _Sequence>
36 _Safe_iterator<_Iterator, _Sequence>::
37 _M_can_advance(
const difference_type& __n)
const
39 if (this->_M_singular())
47 bool __ok = ((__dist.
second == __dp_exact && __dist.
first >= -__n)
48 || (__dist.
second != __dp_exact && __dist.
first > 0));
55 bool __ok = ((__dist.
second == __dp_exact && __dist.
first >= __n)
56 || (__dist.
second != __dp_exact && __dist.
first > 0));
61 template<
typename _Iterator,
typename _Sequence>
63 _Safe_iterator<_Iterator, _Sequence>::
64 _M_valid_range(
const _Safe_iterator& __rhs)
const
66 if (!_M_can_compare(__rhs))
75 if (__dist.
first == 0)
81 return __dist.
first >= 0;
89 if (_M_is_beginnest() || __rhs._M_is_end())
91 if (_M_is_end() || __rhs._M_is_beginnest())
_T2 second
first is a copy of the first object
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
_T1 first
second_type is the second bound type
Struct holding two objects of arbitrary type.
std::pair< typename std::iterator_traits< _Iterator >::difference_type, _Distance_precision > __get_distance(const _Iterator &__lhs, const _Iterator &__rhs, std::random_access_iterator_tag)
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...