[Issue 20964] poor CTFE support for backward pointer iteration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 22 05:22:37 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=20964
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
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'm not understanding why the conventional solution won't work for your case.
--
More information about the Digitalmars-d-bugs
mailing list