On Monday, 20 June 2016 at 14:08:58 UTC, Gary Willoughby wrote:
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?

Can't `opApply` with `auto` return type works since it infers attributes ?

Reply via email to