29#ifndef _GLIBCXX_DEBUG_SAFE_LOCAL_ITERATOR_TCC
30#define _GLIBCXX_DEBUG_SAFE_LOCAL_ITERATOR_TCC 1
34 template<
typename _Iterator,
typename _Sequence>
35 typename _Distance_traits<_Iterator>::__type
36 _Safe_local_iterator<_Iterator, _Sequence>::
37 _M_get_distance_to(
const _Safe_local_iterator& __rhs)
const
39 if (base() == __rhs.base())
40 return { 0, __dp_exact };
44 if (__rhs._M_is_end())
47 _M_get_sequence()->bucket_size(bucket()),
51 return { 1, __dp_sign };
56 if (__rhs._M_is_begin())
59 -_M_get_sequence()->bucket_size(bucket()),
63 return { -1, __dp_sign };
66 if (__rhs._M_is_begin())
67 return { -1, __dp_sign };
69 if (__rhs._M_is_end())
70 return { 1, __dp_sign };
72 return { 1, __dp_equality };
75 template<
typename _Iterator,
typename _Sequence>
77 _Safe_local_iterator<_Iterator, _Sequence>::
78 _M_valid_range(
const _Safe_local_iterator& __rhs,
81 if (!_M_can_compare(__rhs))
84 if (bucket() != __rhs.bucket())
89 __dist = _M_get_distance_to(__rhs);
93 if (__dist.
first == 0)
99 return __dist.
first >= 0;
GNU debug classes for public use.
Struct holding two objects of arbitrary type.
_T1 first
The first member.
_T2 second
The second member.