Mjolnir Core
Core functionality of the Mjolnir API

◆ set_bits_with_int()

constexpr void set_bits_with_int ( T_Type &  integer,
UST  index,
UST  value 
)
constexprnoexcept

Set multiple consecutive bits of an unsigned integer using the bit pattern of another integer value.

Template Parameters
t_num_bitsNumber of bits that should be set. Values of the source integer value that can't be represented by the provided number of bits will trigger an assertion
t_clear_bitsIf false, already set bits won't be cleared to match the source integers bit pattern.
T_TypeAn unsigned integer type
Parameters
[in,out]integerThe integer that should be modified
[in]indexThe index of the first bit that should be modified
[in]valueThe source integer