DoxigAlpha

StaticBitSet

Returns the optimal static bit set type for the specified number of elements: either IntegerBitSet or ArrayBitSet, both of which fulfill the same interface. The returned type will perform no allocations, can be copied by value, and does not require deinitialization.

Source

Implementation

#
pub fn StaticBitSet(comptime size: usize) type {
    if (size <= @bitSizeOf(usize)) {
        return IntegerBitSet(size);
    } else {
        return ArrayBitSet(usize, size);
    }
}