alias BitV48 = BitVector!48; ulong ull; BitV48 bits = cast(Bit48) ull.toBitVector;
I find it necessary to make the user *cast* explicitly. I just wanted to add that though I am comfortable with this syntax, it is not the most efficient way since two methods toBitVector and opCast are being invoked. That would not be the case if D had provision for opCastLeft. And the syntax would have been smoother too.
BTW I still have a ull.toBitVector!N, but aligned with std.conv:to functionality it makes a runtime check and raises ConvOverflowException if required.
regards - Cherry
