696 _GLIBCXX_BEGIN_NAMESPACE_VERSION
705 using std::iterator_traits;
707 template<
typename _Iterator,
typename _Container>
708 class __normal_iterator
711 _Iterator _M_current;
713 typedef iterator_traits<_Iterator> __traits_type;
716 typedef _Iterator iterator_type;
717 typedef typename __traits_type::iterator_category iterator_category;
718 typedef typename __traits_type::value_type value_type;
719 typedef typename __traits_type::difference_type difference_type;
720 typedef typename __traits_type::reference reference;
721 typedef typename __traits_type::pointer pointer;
723 _GLIBCXX_CONSTEXPR __normal_iterator() : _M_current(_Iterator()) { }
726 __normal_iterator(
const _Iterator& __i) : _M_current(__i) { }
729 template<
typename _Iter>
730 __normal_iterator(
const __normal_iterator<_Iter,
731 typename __enable_if<
732 (std::__are_same<_Iter, typename _Container::pointer>::__value),
733 _Container>::__type>& __i)
734 : _M_current(__i.base()) { }
739 {
return *_M_current; }
743 {
return _M_current; }
754 {
return __normal_iterator(_M_current++); }
766 {
return __normal_iterator(_M_current--); }
770 operator[](
const difference_type& __n)
const
771 {
return _M_current[__n]; }
774 operator+=(
const difference_type& __n)
775 { _M_current += __n;
return *
this; }
778 operator+(
const difference_type& __n)
const
779 {
return __normal_iterator(_M_current + __n); }
782 operator-=(
const difference_type& __n)
783 { _M_current -= __n;
return *
this; }
786 operator-(
const difference_type& __n)
const
787 {
return __normal_iterator(_M_current - __n); }
791 {
return _M_current; }
803 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
805 operator==(
const __normal_iterator<_IteratorL, _Container>& __lhs,
806 const __normal_iterator<_IteratorR, _Container>& __rhs)
807 {
return __lhs.base() == __rhs.base(); }
809 template<
typename _Iterator,
typename _Container>
811 operator==(
const __normal_iterator<_Iterator, _Container>& __lhs,
812 const __normal_iterator<_Iterator, _Container>& __rhs)
813 {
return __lhs.base() == __rhs.base(); }
815 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
817 operator!=(
const __normal_iterator<_IteratorL, _Container>& __lhs,
818 const __normal_iterator<_IteratorR, _Container>& __rhs)
819 {
return __lhs.base() != __rhs.base(); }
821 template<
typename _Iterator,
typename _Container>
823 operator!=(
const __normal_iterator<_Iterator, _Container>& __lhs,
824 const __normal_iterator<_Iterator, _Container>& __rhs)
825 {
return __lhs.base() != __rhs.base(); }
828 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
830 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
831 const __normal_iterator<_IteratorR, _Container>& __rhs)
832 {
return __lhs.base() < __rhs.base(); }
834 template<
typename _Iterator,
typename _Container>
836 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
837 const __normal_iterator<_Iterator, _Container>& __rhs)
838 {
return __lhs.base() < __rhs.base(); }
840 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
842 operator>(
const __normal_iterator<_IteratorL, _Container>& __lhs,
843 const __normal_iterator<_IteratorR, _Container>& __rhs)
844 {
return __lhs.base() > __rhs.base(); }
846 template<
typename _Iterator,
typename _Container>
848 operator>(
const __normal_iterator<_Iterator, _Container>& __lhs,
849 const __normal_iterator<_Iterator, _Container>& __rhs)
850 {
return __lhs.base() > __rhs.base(); }
852 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
854 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
855 const __normal_iterator<_IteratorR, _Container>& __rhs)
856 {
return __lhs.base() <= __rhs.base(); }
858 template<
typename _Iterator,
typename _Container>
860 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
861 const __normal_iterator<_Iterator, _Container>& __rhs)
862 {
return __lhs.base() <= __rhs.base(); }
864 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
866 operator>=(
const __normal_iterator<_IteratorL, _Container>& __lhs,
867 const __normal_iterator<_IteratorR, _Container>& __rhs)
868 {
return __lhs.base() >= __rhs.base(); }
870 template<
typename _Iterator,
typename _Container>
872 operator>=(
const __normal_iterator<_Iterator, _Container>& __lhs,
873 const __normal_iterator<_Iterator, _Container>& __rhs)
874 {
return __lhs.base() >= __rhs.base(); }
880 template<
typename _IteratorL,
typename _IteratorR,
typename _Container>
881 #if __cplusplus >= 201103L
884 operator-(
const __normal_iterator<_IteratorL, _Container>& __lhs,
885 const __normal_iterator<_IteratorR, _Container>& __rhs)
886 -> decltype(__lhs.base() - __rhs.base())
888 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
889 operator-(
const __normal_iterator<_IteratorL, _Container>& __lhs,
890 const __normal_iterator<_IteratorR, _Container>& __rhs)
892 {
return __lhs.base() - __rhs.base(); }
894 template<
typename _Iterator,
typename _Container>
895 inline typename __normal_iterator<_Iterator, _Container>::difference_type
896 operator-(
const __normal_iterator<_Iterator, _Container>& __lhs,
897 const __normal_iterator<_Iterator, _Container>& __rhs)
898 {
return __lhs.base() - __rhs.base(); }
900 template<
typename _Iterator,
typename _Container>
901 inline __normal_iterator<_Iterator, _Container>
902 operator+(
typename __normal_iterator<_Iterator, _Container>::difference_type
903 __n,
const __normal_iterator<_Iterator, _Container>& __i)
904 {
return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
906 _GLIBCXX_END_NAMESPACE_VERSION
bool operator>=(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:644
bool operator==(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
_Safe_iterator< _Iterator, _Sequence > operator+(typename _Safe_iterator< _Iterator, _Sequence >::difference_type __n, const _Safe_iterator< _Iterator, _Sequence > &__i)
Definition: safe_iterator.h:712
bool operator>(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:612
_Safe_iterator< _IteratorL, _Sequence >::difference_type operator-(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:680
bool operator!=(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))