BitArray.opSliceAssign

Copy the bits from one array into this array. This is not a shallow copy.

struct BitArray
opSliceAssign

Parameters

rhs BitArray

A BitArray with the same number of bits as this bit array.

Return Value

Type: BitArray

A shallow copy of this array.

BitArray ba = [0,1,0,1,0];
BitArray ba2;
ba2.length = ba.length;
ba2[] = ba; // perform the copy
ba[0] = true;
assert(ba2[0] == false);

Meta