maskBit

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

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

Examples

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

Meta