#include "mph_bits.h" namespace cxxmph { const uint8_t dynamic_2bitset::vmask[] = { 0xfc, 0xf3, 0xcf, 0x3f}; template struct bitcount { enum { value = (n & mask ? 1:0) + bitcount> 1)>::value }; }; template struct bitcount { enum { value = 0 }; }; template class CompileTimeRankTable { public: CompileTimeRankTable() : current(bitcount::value) { } uint8_t operator[] (uint8_t i) { return *(¤t + size - i - 1); } private: unsigned char current; CompileTimeRankTable next; }; template class CompileTimeRankTable { }; static CompileTimeRankTable<256> kRanktable; uint8_t Ranktable::get(uint8_t i) { return kRanktable[i]; } }