Mjolnir Core
Core functionality of the Mjolnir API

◆ get_bits_shift_max() [1/2]

constexpr auto get_bits_shift_max ( T_Type  integer) -> T_ReturnType
constexprnoexcept

Extract a bit pattern from an integer and store it with a maximal shift in a new integer.

Template Parameters
t_num_bitsThe patterns number of bits
t_indexThe index of the first bit of the bit pattern
t_shift_rightIf true, the bit pattern will be maximally shifted to the right (low bits) and to the left (high bits) otherwise
T_TypeThe type of the source integer.
T_ReturnTypeThe type of the returned integer
Parameters
[in]integerThe source integer
Returns
An integer containing the extracted and shifted bit pattern.