Functor that calculates the number of digits in an unsigned integer using binary search.
More...
template<typename T, int MinDigits, int MaxDigits, typename = void>
struct DigitCounter< T, MinDigits, MaxDigits, typename >
Functor that calculates the number of digits in an unsigned integer using binary search.
The code for doing the binary search is generated and unrolled at compile time.
- Template Parameters
-
T | the unsigned integer type of the input to the functor |
MinDigits | the minimum number of digits the integer is known to have |
MaxDigits | the maximum number of digits the integer is known to have |