- Timestamp:
- Jul 22, 2008, 10:18:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/StrideIterator.h
r1378 r1386 28 28 #include "iterator_traits.h" 29 29 #include "yat_assert.h" 30 31 #include <boost/iterator/iterator_adaptor.hpp> 30 32 31 33 #include <iterator> … … 126 128 127 129 /** 128 Conversion from mutable iterator to const iterator. Only works 129 if underlying iterator is a pointer. 130 */ 131 // Peter, this is ugly hack to provide iterator to const_iterator 132 // for our gsl_iterators - solution? use Boost:iterator_adaptor 133 operator StrideIterator<const value_type*>() 134 { return StrideIterator<const value_type*>(base(), stride_); } 130 \brief Conversion constructor. 131 132 Create a StrideIterator<Iter> from a StrideIterator<I2>. Possible 133 if I2 is convertible to a Iter. Constructor allows implicit 134 conversions such as iterator to const_iterator. 135 */ 136 template<typename I2> 137 StrideIterator(StrideIterator<I2> other, 138 typename boost::enable_if_convertible<I2, Iter>::type* = 0 ) 139 : iterator_(other.base()), stride_(other.stride()) {} 135 140 136 141 /**
Note: See TracChangeset
for help on using the changeset viewer.