Closed
Description
Currently range_rev(hi, lo)
iterates [hi..lo)
, but it probably should iterate (hi..lo]
.
For example, consider iterating indexes of vector of length 10 from the end. Currently that is range_rev(10-1, -1)
, but since hi
and lo
should be the same type, this can't be uint
, and to be used as an index it needs to be cast. range_rev(10, 0)
would be better.
This is from the mailing list discussion.