1 #ifndef CONTAINER_CIRCULAR_ITERATOR_IMPL_H_
2 #define CONTAINER_CIRCULAR_ITERATOR_IMPL_H_
37 template<
typename T,
typename V,
typename P = V*,
typename R = V&>
39 V, typename T::difference_type, P, R>
57 : m_begin(b), m_end(e), m_it(i)
74 explicit operator base_type()
const
142 if (m_it == m_begin) {
169 return (m_it == rhs.m_it);
181 return (m_it == rhs);
216 #endif // end-of-include-guard
CircularIterator(base_type b, base_type e, base_type i)
Constructor requires range and start value.
Implementation of a circular iterator.
bool operator==(const base_type &rhs) const
Equality test of the pointing iterator only, not of the range iterators.
type & operator++()
Pre-increment operator works circularly: at the end of the range it jumps back to the beginning and k...
bool operator!=(const type &rhs) const
Inequality test of the pointing iterator only, not of the range iterators.
type operator++(int)
Post-increment operator works circularly: at the end of the range it jumps back to the beginning and ...
see the online C++11 documentation
bool operator==(const type &rhs) const
Equality test of the pointing iterator only, not of the range iterators.
Namespace for the core simulator.
type & operator--()
Pre-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps ...
bool operator!=(const base_type &rhs) const
Inequality test of the pointing iterator only, not of the range iterators.
type::pointer operator->() const
Structure dereferencing operator.
type & operator=(const base_type &i)
Assignment operator from base type to circularized iterator.
type operator--(int)
Post-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps...
type::reference operator*() const
Dereferencing operator.