IotaIterator!int iota; StrideIterator!(IotaIterator!int, -3) stride; iota -= stride._stride; --stride; assert(*stride == *iota); iota += stride._stride; ++stride; assert(*stride == *iota); assert(stride[7] == iota[7 * stride._stride]); iota -= 100 * stride._stride; stride -= 100; assert(*stride == *iota); iota += 100 * stride._stride; stride += 100; assert(*stride == *iota); assert(*(stride + 10) == *(iota + 10 * stride._stride)); assert(stride - 1 < stride); assert((stride - 5) - stride == -5);
Iterates an iterator with a fixed strides.
StrideIterator is used by stride.