On 9/10/2011 5:37 PM, dsimcha wrote:
* newArray could only take the element type as a template parameter; the
number of dimensions in unequivocally determined from the number of
arguments.
Good point. Actually, this can probably be changed in
std.array.uninitializedArray, too. There was some reason why I did it
the way I did, but I don't remember why. I'll look into it.
Ok, now I remember. It was so that if you give too many dimensions,
it's a compile time error, not a runtime error. For example:
auto foo = alloc.newArray!(int[][])(8, 6, 7, 5, 3, 0, 9); // Error