Mjolnir Core
Core functionality of the Mjolnir API

◆ get_bit_shift_max() [1/2]

constexpr auto get_bit_shift_max ( T_Type  integer) -> T_ReturnType
constexprnoexcept

Extract a bit from an integer and shift it maximally.

Template Parameters
t_indexThe index of the bit that should be extracted
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
Returns
An integer containing the extracted and shifted bit value.