D-Programming-Language/phobos — pull request #1213 by monarchdodra (2013-03-19 12:05:14+00:00)
Title: Make array CTFE-able

From the conversation over at: http://forum.dlang.org/thread/uhvwbttbxxqzgculaacb@forum.dlang.org?page=3#post-ki84nc:2429ns:241:40digitalmars.com

All it actually took was changing the underlying uninitializedArray implementation to actually make it work.

Note that the final result in regards to Type support will depend on if/when we pull my Emplace + Array improvements get pulled:
* #1174 : Fixes in std.array.array
* #1082 : Fix emplace

In any case, it's nothing that can be fixed dirrectly inside array.

--------
I also took this opportunity to improve and fix arrayAllocImpl:
1) minimallyInitializedArray was only minimally intialized when 1 level deep. It now correctly works for any level of deepness.
2) If the array is going to be initialized with T.init anyways, then we call `new T[]` directly, instead of doing the redundant `malloc` + `ret[] = T.init;`