[Issue 15860] lockstep should support foreach_reverse

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 6 23:32:26 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15860

--- Comment #2 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
The pull request above adds foreach_reverse without index to any set of
bidirectional ranges (but if one or more is not bidirectional, foreach_reverse
is of course not possible).

Indexed reverse iteration has more requirements:

All iterated ranges must have have a length, and the stoppingPolicy must be
requireSameLength. Sadly, the latter is a runtime value, so it has to be
handled with enforce. I'd have prefered to disallow it at compile-time.

--


More information about the Digitalmars-d-bugs mailing list