Thread overview | |||||
---|---|---|---|---|---|
|
May 17, 2012 isInputRange instead of isForwardRange for std.algorithm.fill | ||||
---|---|---|---|---|
| ||||
It looks to me that isForwardRange is too much of a restriction for the fill algorithm, isInputRange could do, we don't need any save() here or am I missing something ? |
May 17, 2012 Re: isInputRange instead of isForwardRange for std.algorithm.fill | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On 5/17/12 2:14 AM, Guillaume Chatelet wrote:
> It looks to me that isForwardRange is too much of a restriction for the
> fill algorithm, isInputRange could do, we don't need any save() here or
> am I missing something ?
That's correct, please file as a bug so we remember. (The second range must be forward in the overload fill(InputRange, ForwardRange) because it's iterated multiple times.)
Andrei
|
May 17, 2012 Re: isInputRange instead of isForwardRange for std.algorithm.fill | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 05/17/12 17:19, Andrei Alexandrescu wrote: > On 5/17/12 2:14 AM, Guillaume Chatelet wrote: >> It looks to me that isForwardRange is too much of a restriction for the fill algorithm, isInputRange could do, we don't need any save() here or am I missing something ? > > That's correct, please file as a bug so we remember. (The second range > must be forward in the overload fill(InputRange, ForwardRange) because > it's iterated multiple times.) > > Andrei Issue : http://d.puremagic.com/issues/show_bug.cgi?id=8112 Associated pull request : https://github.com/D-Programming-Language/phobos/pull/588 Guillaume |
Copyright © 1999-2021 by the D Language Foundation