maskBit

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

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

Examples

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

Meta