MySQL 9.1.0
Source Code Documentation
DigitCounter< T, MinDigits, MaxDigits, typename > Struct Template Reference

Functor that calculates the number of digits in an unsigned integer using binary search. More...

#include <integer_digits.h>

Public Member Functions

constexpr int operator() (T x) const
 

Static Private Member Functions

static constexpr T pow10 (int n)
 

Detailed Description

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
Tthe unsigned integer type of the input to the functor
MinDigitsthe minimum number of digits the integer is known to have
MaxDigitsthe maximum number of digits the integer is known to have

Member Function Documentation

◆ operator()()

template<typename T , int MinDigits, int MaxDigits, typename = void>
constexpr int DigitCounter< T, MinDigits, MaxDigits, typename >::operator() ( x) const
inlineconstexpr

◆ pow10()

template<typename T , int MinDigits, int MaxDigits, typename = void>
static constexpr T DigitCounter< T, MinDigits, MaxDigits, typename >::pow10 ( int  n)
inlinestaticconstexprprivate

The documentation for this struct was generated from the following file: