Hi all,

I would like to use bt function (core.bitop) on generic array but it seems that's not possible. I would like to know if there is some reasons to have a fixed type (size_t) instead of something like :

 pure @system int bt(T)(in T* p,size_t bitnum)
 if(__traits(isIntegral,T))
 {
return p[bitnum/ (T.sizeof*8)] & (1 << (bitnum& ((T.sizeof*8) - 1)));
 }

Thank you for your help.

Reply via email to