4 ms·
Ah, that is useful to know. Is that documented somewhere? From what I can quickly find in the obvious place [0], the only requirement is that "all fields in a p
by tremon 4mo ago
Ah, that is useful to know. Is that documented somewhere? From what I can quickly find in the obvious place [0], the only requirement is that "all fields in a packed union must have the same @bitSizeOf" and [2]u8 does satisfy that requirement.
[0] https://ziglang.org/documentation/0.16.0/#packed-union https://ziglang.org/documentation/0.16.0/#packed-union
- peesem 4mo agono, but the documentation for packed structs gives the list of allowed field types. it's also not documented that packed union fields must be valid packed struct fields but people may be able to assume that edit: also, this is a relevant issue: https://github.com/ziglang/zig/issues/12547 https://github.com/ziglang/zig/issues/12547