Ejemplo n.º 1
0
 strided_iterator(
     const strided_iterator<OtherIterator, Category>& other,
     typename enable_if_convertible<
         OtherIterator,
         base_iterator
     >::type* = 0
 )
     : m_it(other.base())
     , m_last(other.base_end())
     , m_stride(other.get_stride())
 {
 }
Ejemplo n.º 2
0
 bool equal(
     const strided_iterator<
         OtherIterator,
         bidirectional_traversal_tag
     >& other,
     typename enable_if_convertible<
         OtherIterator,
         base_iterator
     >::type* = 0) const
 {
     return (m_index + m_offset) ==
                 (other.get_index() + other.get_offset());
 }
Ejemplo n.º 3
0
 strided_iterator(
     const strided_iterator<
         OtherIterator,
         random_access_traversal_tag
     >& other,
     typename enable_if_convertible<
         OtherIterator,
         base_iterator
     >::type* = 0
 )
     : m_it(other.base())
     , m_first(other.base_begin())
     , m_index(other.get_index())
     , m_stride(other.get_stride())
 {
 }
Ejemplo n.º 4
0
 strided_iterator(
     const strided_iterator<
         OtherIterator,
         bidirectional_traversal_tag
     >& other,
     typename enable_if_convertible<
         OtherIterator,
         base_iterator
     >::type* = 0
 )
     : m_it(other.base())
     , m_offset(other.get_offset())
     , m_index(other.get_index())
     , m_stride(other.get_stride())
 {
 }
 difference_type
 distance_to(const strided_iterator& other) const
 {
     return std::distance(this->base_reference(), other.base_reference()) / m_stride;
 }
 bool equal(const strided_iterator<Iterator> &other) const
 {
     return (other.m_stride == m_stride)
                && (other.base_reference() == this->base_reference());
 }
 strided_iterator(const strided_iterator<Iterator> &other)
     : super_type(other.base()),
       m_stride(other.m_stride)
 {
 }