https://issues.dlang.org/show_bug.cgi?id=5351
--- Comment #4 from Jesse Phillips <[email protected]> --- (In reply to Simen Kjaeraas from comment #3) > The implementation above will fail for this simple case: > > MyRange!int a = [1,2,3]; > a.popFront(); > assert(a[0] == a.front); > > It could be made to work for ranges that support slicing, and assignment > from the slice to the range: > > void popFront() { > this = this[1..$]; > } Actually this would be a good verification to add to isRandomAccessRange because your correct that this wouldn't match for random access, but such a behavior is fine for forward and bidirectional. Now that being said, the confusion of having an indexable, non-randomAccessRange with this kind of behavior would be there. --
