Cherry:

alias BitVector!48 bitv48;
long ll;
bitv48 foo = cast(bitv48) ll;    // I need cast here

In D types like bitv48 usually (should) start with an uppercase, and the alias syntax with = is now preferred.

Is this good enough?

alias Bitv48 = BitVector!48;
ulong ull;
auto foo = ull.toBitV!Bitv48;

Where toBitV is a little function of yours.

Bye,
bearophile

Reply via email to