On Tue, 21 Apr 2015 15:48:25 -0700, Jonathan M Davis via Digitalmars-d
wrote:

> On Tuesday, April 21, 2015 19:53:47 ketmar via Digitalmars-d 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. ;-)
> 
> If
> 
> auto h = r.front;
> 
> doesn't work, then I don't think that it can be a range. And if that
> means that elements have to be copyable to be in a range, then I think
> that they're going to have to be copyable. There is going to be _way_
> too much code out there that does
> 
> auto h = r.front;
> 
> for it to work to try and claim that something is an input range when
> that line doesn't work. And IIRC, C++ STL containers require that their
> elements be copyable in order to work, so it's not like we'd be the
> first to require this sort of thing.

the thing is that chain, or filter, or other algorithms are perfectly 
able to work with such ranges, yet it is forbidden now. it looks like 
arbitrary limitation to me.

Attachment: signature.asc
Description: PGP signature

Reply via email to