61a62,72
> * Extract the bit from this position from 'val' and right justify it.
> */
> template <class T>
> inline
> T
> bits(T val, int bit)
> {
> return bits(val, bit, bit);
> }
>
> /**
104a116,126
> * Overloaded for access to only one bit in value
> */
> template <class T, class B>
> inline
> T
> insertBits(T val, int bit, B bit_val)
> {
> return insertBits(val, bit, bit, bit_val);
> }
>
> /**
115a138,145
> /** Overloaded function to allow to access only 1 bit*/
> template <class T, class B>
> inline
> void
> replaceBits(T& val, int bit, B bit_val)
> {
> val = insertBits(val, bit, bit, bit_val);
> }