29 #ifndef _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H 30 #define _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H 1 51 template<
typename _Iterator,
52 typename =
typename std::__is_integer<_Iterator>::__type>
53 struct _Distance_traits
57 typename std::iterator_traits<_Iterator>::difference_type _ItDiffType;
59 template<
typename _DiffType,
60 typename =
typename std::__is_void<_DiffType>::__type>
62 {
typedef _DiffType __type; };
64 template<
typename _DiffType>
65 struct _DiffTraits<_DiffType,
std::__true_type>
66 {
typedef std::ptrdiff_t __type; };
68 typedef typename _DiffTraits<_ItDiffType>::__type _DiffType;
74 template<
typename _Integral>
75 struct _Distance_traits<_Integral,
std::__true_type>
81 template<
typename _Iterator>
82 inline typename _Distance_traits<_Iterator>::__type
87 template<
typename _Iterator>
88 inline typename _Distance_traits<_Iterator>::__type
98 template<
typename _Iterator>
99 inline typename _Distance_traits<_Iterator>::__type
107 template<
typename _Integral>
120 template<
typename _InputIterator>
123 const _InputIterator& __last,
133 if (__dist.
first == 0)
138 return __dist.
first >= 0;
150 template<
typename _InputIterator>
155 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
159 template<
typename _InputIterator>
161 __valid_range(
const _InputIterator& __first,
const _InputIterator& __last)
163 typename _Distance_traits<_InputIterator>::__type __dist;
167 #if __cplusplus < 201103L 169 template<
typename _Iterator>
170 struct __is_safe_random_iterator
172 enum { __value = 0 };
173 typedef std::__false_type __type;
176 template<
typename _Iterator>
178 : std::_Iter_base<_Iterator, __is_safe_random_iterator<_Iterator>::__value>
187 template<
typename _Iterator>
188 inline typename _Siter_base<_Iterator>::iterator_type
189 __base(_Iterator __it)
190 {
return _Siter_base<_Iterator>::_S_base(__it); }
192 template<
typename _Iterator>
194 __base(_Iterator __it)
198 #if __cplusplus < 201103L 199 template<
typename _Iterator>
201 {
typedef _Iterator _Type; };
205 template<
typename _Iterator>
207 __unsafe(_Iterator __it)
bool __valid_range_aux(const _Integral &, const _Integral &, typename _Distance_traits< _Integral >::__type &__dist, std::__true_type)
Struct holding two objects of arbitrary type.
GNU debug classes for public use.
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.
ISO C++ entities toplevel namespace is std.
_Distance_traits< _Iterator >::__type __get_distance(const _Iterator &__lhs, const _Iterator &__rhs, std::random_access_iterator_tag)
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
bool __valid_range(const _InputIterator &__first, const _InputIterator &__last, typename _Distance_traits< _InputIterator >::__type &__dist)
Random-access iterators support a superset of bidirectional iterator operations.
_T1 first
second_type is the second bound type
_T2 second
first is a copy of the first object