19 #ifndef CIRCULAR_ITERATOR_HH
20 #define CIRCULAR_ITERATOR_HH
25 class const_circular_iter :
public std::iterator<std::bidirectional_iterator_tag,typename T::value_type>
27 typedef typename T::const_iterator iterator;
28 typedef typename T::value_type value_type;
76 for(
unsigned int i=0;i<n;++i)
83 for(
unsigned int i=0;i<n;++i)
100 class circular_iter :
public std::iterator<std::bidirectional_iterator_tag,typename T::value_type>
102 typedef typename T::iterator iterator;
103 typedef typename T::value_type value_type;
111 circular_iter(iterator b, iterator e, iterator pos) : iter(pos), begin(b), end(e) {};
148 for(
unsigned int i=0;i<n;++i)
155 for(
unsigned int i=0;i<n;++i)
167 {
return (iter == rhs.iter);}
circular_iter< T > operator--(int)
const_circular_iter< T > & operator--()
bool operator!=(const const_circular_iter< T > &rhs) const
const_circular_iter(iterator b, iterator e, iterator pos)
circular_iter(iterator b, iterator e, iterator pos)
const_circular_iter< T > operator-(int n)
const_circular_iter(iterator b, iterator e)
bool operator==(const circular_iter< T > &rhs) const
const_circular_iter< T > & operator++()
circular_iter< T > operator++(int)
const_circular_iter< T > operator--(int)
bool operator==(const const_circular_iter< T > &rhs) const
const value_type operator*() const
circular_iter< T > & operator--()
const_circular_iter(T &t)
const_circular_iter< T > operator++(int)
const value_type operator*() const
bool operator!=(const circular_iter< T > &rhs) const
circular_iter< T > operator-(int n)
const_circular_iter< T > operator+(int n)
circular_iter< T > operator+(int n)
circular_iter(iterator b, iterator e)
circular_iter< T > & operator++()