IotaIterator!int iota; StrideIterator!(IotaIterator!int) stride; stride._stride = -3; 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); iota = IotaIterator!int(3); stride = StrideIterator!(IotaIterator!int)(3, iota); assert(*stride == *iota);
Iterates an iterator with a fixed strides.
StrideIterator is used by stride.