D-Programming-Language/phobos — pull request #1174 by monarchdodra (2013-02-25 11:56:19+00:00)
Title: Fixes in std.array.array

3 corrections to `std.array.array`

**Const correctness in array**

Because the code `e.opAssign(e)` potentially actually ends up checking if you can assign *to* a const, which would fail. `index[i]` is not const, so is a much better check.

**disabled opAssign support for array**

`array` did not correctly support structs with disabled `opAssign`.

It still doesn't, because `emplace` is broken, but the bug was moved. `array` will get fixed spontaneously when `emplace` gets fixed.

**array statically turns down infinite ranges**

Because trying to array an infinite array would be stupid.

Like my fix to `walkLength`, this *may* break strange code that declares `array(infRange);` but never actually calls it. There are no such cases (AFAIK) in phobos.