30 #ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC
31 #define _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC 1
35 template<
typename _Iterator,
typename _Sequence>
37 _Safe_iterator<_Iterator, _Sequence>::
38 _M_can_advance(
const difference_type& __n)
const
40 typedef typename _Sequence::const_iterator const_debug_iterator;
41 typedef typename const_debug_iterator::iterator_type const_iterator;
43 if (this->_M_singular())
49 const_iterator __begin = _M_get_sequence()->_M_base().begin();
52 bool __ok = ((__dist.
second == __dp_exact && __dist.
first >= -__n)
53 || (__dist.
second != __dp_exact && __dist.
first > 0));
58 const_iterator __end = _M_get_sequence()->_M_base().end();
61 bool __ok = ((__dist.
second == __dp_exact && __dist.
first >= __n)
62 || (__dist.
second != __dp_exact && __dist.
first > 0));
67 template<
typename _Iterator,
typename _Sequence>
68 template<
typename _Other>
70 _Safe_iterator<_Iterator, _Sequence>::
71 _M_valid_range(
const _Safe_iterator<_Other, _Sequence>& __rhs)
const
73 if (!_M_can_compare(__rhs))
82 if (__dist.
first == 0)
88 return __dist.
first >= 0;
96 if (_M_is_beginnest() || __rhs._M_is_end())
98 if (_M_is_end() || __rhs._M_is_beginnest())
_T1 first
second_type is the second bound type
_T2 second
first is a copy of the first object
std::pair< typename std::iterator_traits< _Iterator1 >::difference_type, _Distance_precision > __get_distance(const _Iterator1 &__lhs, const _Iterator2 &__rhs, std::random_access_iterator_tag)
Struct holding two objects of arbitrary type.