57 #define _EXT_ITERATOR 1
59 #pragma GCC system_header
64 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
66 _GLIBCXX_BEGIN_NAMESPACE_VERSION
73 template<
typename _InputIterator,
typename _Distance>
75 __distance(_InputIterator __first, _InputIterator __last,
79 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
80 while (__first != __last)
87 template<
typename _RandomAccessIterator,
typename _Distance>
89 __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
93 __glibcxx_function_requires(_RandomAccessIteratorConcept<
94 _RandomAccessIterator>)
95 __n += __last - __first;
103 template<typename _InputIterator, typename _Distance>
105 distance(_InputIterator __first, _InputIterator __last,
112 _GLIBCXX_END_NAMESPACE_VERSION
iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
Random-access iterators support a superset of bidirectional iterator operations.
void distance(_InputIterator __first, _InputIterator __last, _Distance &__n)