packFlags

pack array of values to bit value

packFlags
(
T
)
(
in T[] list...
)
if (
isIntegral!T
)

Examples

1 assertEq( packFlags!uint(), 0 );
2 auto a = 0b01;
3 assertEq( packFlags(a), a );
4 auto b = 0b10;
5 auto c = 0b11;
6 assertEq( packFlags(a,b), c );

Meta