_d_arrayassign_r

fnTarr _d_arrayassign_r(Tarr : T[], T)(return scope Tarr to, scope Tarr from) @trusted

Does array assignment (not construction) from another array of the same element type. Does not support overlapping copies. Assumes the right hand side is an rvalue,

Used for static array assignment with non-POD element types:

struct S
{
   ~this() {} // destructor, so not Plain Old Data
}

void main()
{
 S[3] arr;
 S[3] getRvalue() {return lvalue;}

 arr = getRvalue();
 // Generates:
 // (__appendtmp = getRvalue), _d_arrayassign_l(arr[], __appendtmp), arr;
}

Parameters

todestination array
fromsource array

Returns

to