maskBit

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

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

Examples

static assert(maskBit!1(0b1111) == 0b1101);

Meta