Mjolnir Core
Core functionality of the Mjolnir API

◆ get_bit_shift_max() [2/2]

constexpr auto get_bit_shift_max ( T_Type  integer,
UST  index 
) -> T_ReturnType
constexprnoexcept

Extract a bit from an integer and shift it maximally.

Template Parameters
t_shift_rightIf true, the bit value will be maximally shifted to the right (lowest bit) and to the left (highest bit) otherwise
T_TypeThe type of the source integer.
T_ReturnTypeThe type of the returned integer
Parameters
[in]integerThe source integer
[in]indexThe index of the bit that should be extracted
Returns
An integer containing the extracted and shifted bit value.