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

Reply via email to