null if either length was 0 or
allocation failed.
T[] makeArray(T)(size_t length)Create an array of T with length elements. The array is either default-initialized, filled with copies of init, or initialized with values fetched from range.
T | element type of the array being created |
length | length of the newly created array |
init | element used for filling the array |
range | range used for initializing the array elements |
null if either length was 0 or
allocation failed.
The overloads that involve copy initialization deallocate memory and propagate the exception if the copy operation throws.
T[] makeArray(T)(size_t length, auto ref T init)Ditto