Trying Multiple Aggregate reduce

monarch_dodra monarchdodra at gmail.com
Tue Apr 1 23:06:01 PDT 2014


On Monday, 31 March 2014 at 22:25:40 UTC, Nordlöw wrote:
>> You can't use reduce with a const seed.
>>
>
> This, surely, must be a compiler bug right?
>
> /Per

Arguably, it's a user bug ;) The user should have provided a 
non-const seed.

*But*, there have been many cases of reduce being made to accept 
const seeds before, via unqualified copy. This case must have 
just been a missed one.

In any case, I had submitted a re-write for reduce, and it just 
so happens to support this. So I added your code to the test 
cases:
https://github.com/D-Programming-Language/phobos/pull/2060


More information about the Digitalmars-d-learn mailing list