_d_newarraymTX

fnTarr _d_newarraymTX(Tarr : U[], T, U)(scope size_t[] dims, bool isShared = false) @trusted

Create a new multi-dimensional array. Also initalize elements if their type has an initializer. Otherwise, not zero-initialize the array.

void main()
{
   S[][] s = new S[][](2, 3)

   // lowering:
   S[] s = _d_newarraymTX!(S[][], S)([2, 3]);
}

Parameters

dimsarray length values for each dimension
isSharedwhether the array should be shared

Returns

newly allocated array