maskBit

Run-time mask() partially specialized for bit-masking.

  1. auto maskBit(const T value)
  2. auto maskBit(const T value, size_t index)
    maskBit
    nothrow @safe pure
    (
    T
    )
    (
    const T value
    ,
    size_t index
    )

Examples

assert(maskBit(0b1111,1) == 0b1101);

Meta