Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Private Constant

max_representable_index_len

Private Constant
std.array_hash_map.max_representable_index_len
const max_representable_index_len = @bitSizeOf(usize) - 4

the byte size of the index must fit in a usize. This is a power of two length * the size of an Index(u32). The index is 8 bytes (3 bits repr) and max_usize + 1 is not representable, so we need to subtract out 4 bits.

File

array_hash_map.zig:1620
1620
const max_representable_index_len = @bitSizeOf(usize) - 4