3 ms·
Just to close the loop here, it looks like that is exactly what zig does for pointers, such that there is a different type of pointer for each combination of bi
by manwe150 2y ago
Just to close the loop here, it looks like that is exactly what zig does for pointers, such that there is a different type of pointer for each combination of bit offsets and byte alignments, and yes it is distinct from a "regular" pointer (of which there isn't one "regular" type either, but also many separate flavors, including C-compatible, single-item, and many-item): https://ziglang.org/documentation/master/#toc-packed-struct https://ziglang.org/documentation/master/#toc-packed-struct