Go to the documentation of this file.00001
00008 #ifndef INTERVAL_MASK_HH
00009 #define INTERVAL_MASK_HH
00010
00012 namespace mask{
00013
00021 template<unsigned int Begin, unsigned int Size>
00022 struct IntervalMask{
00023 static const unsigned int val= 1<<Begin | IntervalMask<Begin+1,Size-1>::val;
00024 };
00025
00027 template<unsigned int Begin>
00028 struct IntervalMask<Begin,0>{
00029 static const unsigned int val= 0;
00030 };
00031
00032 }
00033
00034 #endif //INTERVAL_MASK_HH