29 #ifndef _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H 30 #define _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H 1 40 template<
typename _Iterator,
typename _Sequence,
typename _Category>
43 #if __cplusplus >= 201103L 44 template<
typename _Iterator,
typename _Sequence>
45 class _Safe_local_iterator;
59 template<
typename _Iterator,
60 typename =
typename std::__is_integer<_Iterator>::__type>
61 struct _Distance_traits
65 typename std::iterator_traits<_Iterator>::difference_type _ItDiffType;
67 template<
typename _DiffType,
68 typename =
typename std::__is_void<_DiffType>::__type>
70 {
typedef _DiffType __type; };
72 template<
typename _DiffType>
73 struct _DiffTraits<_DiffType,
std::__true_type>
74 {
typedef std::ptrdiff_t __type; };
76 typedef typename _DiffTraits<_ItDiffType>::__type _DiffType;
82 template<
typename _Integral>
83 struct _Distance_traits<_Integral,
std::__true_type>
89 template<
typename _Iterator>
90 inline typename _Distance_traits<_Iterator>::__type
95 template<
typename _Iterator>
96 inline typename _Distance_traits<_Iterator>::__type
106 template<
typename _Iterator>
107 inline typename _Distance_traits<_Iterator>::__type
115 template<
typename _Integral>
128 template<
typename _InputIterator>
140 if (__dist.
first == 0)
145 return __dist.
first >= 0;
157 template<
typename _InputIterator>
162 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
166 template<
typename _Iterator,
typename _Sequence,
typename _Category>
168 __valid_range(
const _Safe_iterator<_Iterator, _Sequence, _Category>&,
169 const _Safe_iterator<_Iterator, _Sequence, _Category>&,
170 typename _Distance_traits<_Iterator>::__type&);
172 #if __cplusplus >= 201103L 173 template<
typename _Iterator,
typename _Sequence>
175 __valid_range(
const _Safe_local_iterator<_Iterator, _Sequence>&,
176 const _Safe_local_iterator<_Iterator, _Sequence>&,
177 typename _Distance_traits<_Iterator>::__type&);
180 template<
typename _InputIterator>
184 typename _Distance_traits<_InputIterator>::__type __dist;
188 template<
typename _Iterator,
typename _Sequence,
typename _Category>
190 __valid_range(
const _Safe_iterator<_Iterator, _Sequence, _Category>&,
191 const _Safe_iterator<_Iterator, _Sequence, _Category>&);
193 #if __cplusplus >= 201103L 194 template<
typename _Iterator,
typename _Sequence>
196 __valid_range(
const _Safe_local_iterator<_Iterator, _Sequence>&,
197 const _Safe_local_iterator<_Iterator, _Sequence>&);
201 template<
typename _InputIterator,
typename _Size>
203 __can_advance(_InputIterator, _Size)
206 template<
typename _Iterator,
typename _Sequence,
typename _Category,
209 __can_advance(
const _Safe_iterator<_Iterator, _Sequence, _Category>&,
218 template<
typename _Iterator>
223 #if __cplusplus < 201103L 224 template<
typename _Iterator>
226 {
typedef _Iterator _Type; };
230 template<
typename _Iterator>
232 __unsafe(_Iterator __it)
_T2 second
first is a copy of the first object
ISO C++ entities toplevel namespace is std.
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
bool __valid_range_aux(_Integral, _Integral, typename _Distance_traits< _Integral >::__type &__dist, std::__true_type)
_T1 first
second_type is the second bound type
GNU debug classes for public use.
Random-access iterators support a superset of bidirectional iterator operations.
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.
Struct holding two objects of arbitrary type.
_Iterator __base(_Iterator __it)
_Distance_traits< _Iterator >::__type __get_distance(_Iterator __lhs, _Iterator __rhs, std::random_access_iterator_tag)
bool __valid_range(_InputIterator __first, _InputIterator __last, typename _Distance_traits< _InputIterator >::__type &__dist)