oversight with input ranges

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 21 15:57:50 PDT 2015


On 4/21/15 3:53 PM, ketmar wrote:
> here's the interesting oversight for isInputRange:
> https://issues.dlang.org/show_bug.cgi?id=14478
>
> so be careful: ranges with non-copyable elements aren't input ranges for
> now. ;-)

This does seem like an incorrect limitation, and I'm not sure if it was 
intentional. However, there is a lot of code out there that expects this 
to work when isInputRange is true. I don't know if we should change it, 
as the range definition is pretty clear in the documentation that auto h 
= r.front is a required feature for ranges. What is the use case for this?

-Steve


More information about the Digitalmars-d mailing list