I want to iterate over a piece of memory using a pointer. I thought about using opSlice but that doesn't provide information for an index in a foreach loop.
auto opSlice() { return this._pointer[0 .. size]; } Anyone got any ideas?
Gary Willoughby via Digitalmars-d-learn Mon, 20 Jun 2016 07:12:07 -0700
I want to iterate over a piece of memory using a pointer. I thought about using opSlice but that doesn't provide information for an index in a foreach loop.
auto opSlice() { return this._pointer[0 .. size]; } Anyone got any ideas?