An interesting problem I\'ve been pondering the past few days is how to copy one integer\'s bits into another integer at a given position in the destination integer. So, for exa
Generalized GRB-fnieto form...
template T setbits4(T destination, T source, int at, int numbits) { T mask = (((T)-1)>>(sizeof(T)*8-numbits))<