oversight with input ranges

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 21 22:31:03 PDT 2015


On Wed, 22 Apr 2015 03:00:18 +0000, Jesse Phillips wrote:

> On Tuesday, 21 April 2015 at 19:53:47 UTC, 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. ;-)
> 
> 
> The problem with allowing the inability to copy elements to be an input
> range is that you must then preven an algorithm from copying the range
> elements, how do you do that without preventing input ranges from having
> copyable elements?

many algorithms in std.algo doesn't copy if you'll use `(ref a)` labmdas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150422/4eb6f8fd/attachment.sig>


More information about the Digitalmars-d mailing list