Shout out to D at cppcon, when talkign about ranges.
lobo via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 30 19:53:24 PDT 2015
On Thursday, 1 October 2015 at 01:54:22 UTC, bitwise wrote:
> On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote:
>> I don't think it would be that hard to make something this
>> possible:
>>
>> for(int x : iota<int>(0, 5).to<take>(3))
>> printf("%d ", x);
>
>
> Curiosity got the best of me:
> http://ideone.com/RoJxLa
>
> output doesn't show up for some reason, but it works.
>
> Bit
Yes, that's what we have always done with iterators. The point is
users shouldn't have to write or instantiate iterators explicitly
for any custom range.
bye,
lobo
More information about the Digitalmars-d
mailing list