Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

Static

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.

bit_set.Static
pub fn Static(comptime size: usize) type

File

lib/std/bit_set.zig:45

Code

pub fn Static(comptime size: usize) type {
    if (size <= @bitSizeOf(usize)) {
        return Integer(size);
    } else {
        return Array(usize, size);
    }
}