https://issues.dlang.org/show_bug.cgi?id=20964
--- Comment #4 from Илья Ярошенко <[email protected]> --- (In reply to Walter Bright from comment #2) > It is not normal practice nor allowed by the memory model to point before > the beginning of a memory block. Pointing one past the end is allowed. > > The conventional solution is to use pre-decrement for reversing, that way > the iteration can start with a pointer one past the end. I am not sure what do you mean by memory model. If you mean a GC model, than it is fine to free the memory as soon as the point moved out of the left bound. At least that works well for Mir. > I'm not understanding why the conventional solution won't work for your case. It may work. It is just annoying to rework it each time. We have a code that works in runtime and we expect it works at compile time, however it doesn't. --
