oversight with input ranges

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 22 08:11:29 PDT 2015


On Wed, 22 Apr 2015 08:41:38 +0000, Dominikus Dittes Scherkl wrote:

> On Tuesday, 21 April 2015 at 23:33:38 UTC, ketmar wrote:
>> On Tue, 21 Apr 2015 15:48:25 -0700, Jonathan M Davis via Digitalmars-d
>> wrote:
>>> auto h = r.front;
>>
>> 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.
> 
> why not introducing a new trait "isNonCopyingInputRange" with the old
> definition and define "isInputRange = isNonCopyingInputRange and
> compiles( auto h = r.front)" and then make filters and chain and all
> algorithms that don't need copying requiring only the new trait?

i already suggested that. but the thing is that:
1. someone has to code that.
2. it has to convince at least W&A to accept the code.

that won't be me, especially considering "2".
-------------- 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/b5c8ac08/attachment.sig>


More information about the Digitalmars-d mailing list