_d_arraycast_frombit

Runtime helper to convert dynamic array of bits dynamic array of another. Adjusts the length of the array. Throws exception if new length is not aligned.

version(none)
extern (C)
void[]
_d_arraycast_frombit
(
uint tsize
,
void[] a
)

Examples

Runtime helper to convert dynamic array of bits dynamic array of another. Adjusts the length of the array. Throws exception if new length is not aligned.

version (D_Bits)
{
bit[int.sizeof * 3 * 8] b;
int[] i;
short[] s;

i = cast(int[])b;
assert(i.length == 3);

s = cast(short[])b;
assert(s.length == 6);
}

Meta