/** Number of bits available in \a _IntT. */
template<class _IntT>
- struct MaxBits
+ struct MaxBitsT
{
typedef _IntT IntT;
static const unsigned value = (sizeof(IntT)*8);
template<class _IntT>
inline std::string asString( _IntT val, char zero = '0', char one = '1' )
{
- std::string s( MaxBits<_IntT>::value, zero );
- for( unsigned i = MaxBits<_IntT>::value; i; )
+ std::string s( MaxBitsT<_IntT>::value, zero );
+ for( unsigned i = MaxBitsT<_IntT>::value; i; )
{
--i;
if ( val & (_IntT)1 )
/** A bitmaks of \a _size 1-bits starting at bit \a _begin. */
template<class _IntT, unsigned _begin, unsigned _size>
- struct Mask
+ struct MaskT
{
typedef _IntT IntT;
static const IntT value = bit_detail::Gen1Bits<IntT,_size>::value << _begin;
struct Range
{
typedef _IntT IntT;
- typedef MaxBits<IntT> MaxBits;
- typedef Mask<IntT,_begin,_size> Mask;
+ typedef MaxBitsT<IntT> MaxBits;
+ typedef MaskT<IntT,_begin,_size> Mask;
static const unsigned begin = _begin;
static const unsigned size = _size;
* \endcode
*/
template<class _IntT>
- class BitField : public Range<_IntT, 0, MaxBits<_IntT>::value>
+ class BitField : public Range<_IntT, 0, MaxBitsT<_IntT>::value>
, private base::SafeBool<BitField<_IntT> >
{
typedef typename base::SafeBool<BitField<_IntT> >::bool_type bool_type;