Skip Navigation
Zig Programming Language @lemm.ee

multi-bounded-array: Similar to std.MultiArrayList() but backed by fixed size arrays with a runtime length

github.com

GitHub - travisstaloch/multi-bounded-array: Similar to std.MultiArrayList() but backed by fixed size arrays

From the README:

Similar to std.MultiArrayList() but backed by fixed size arrays with a shared runtime length.

Each field of T becomes an array with max length buffer_capacity. To access the arrays as slices use items(field) or constItems(field).

Useful when a struct of small arrays is desired with capacity that is known at compile time. Like std.BoundedArray, MultiBoundedArrays are only values and thus may be copied.

0 comments

No comments