Is there any way to make opApply @nogc? or provide the same foreach functionality without implementing a range interface?

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?

Reply via email to