On 2012-10-17 17:45, Jonathan M Davis wrote:
Well, what would you expect? Ranges are consumed when you iterate over them. So, if an container is a range, it will be consumed when you iterate over it. That's the way that it _has_ to work given how ranges work, and that's why you overload opSlice to return a range which is iterated over rather than making the container itself a range.
How does this work with built-in arrays? -- /Jacob Carlborg