Until #104 is implemented, a ?u15 takes 4 bytes, which is unacceptable as it doubles the size of this already massive structure.
Also, there are no to / from methods because LLVM 21 does not
optimize away the conversion from and to ?u15.
const PackedOptionalU15 = packed struct(u16)
const PackedOptionalU15 = packed struct(u16) {
value: u15,
is_null: bool,
pub fn int(p: PackedOptionalU15) u16 {
return @bitCast(p);
}
pub const null_bit: PackedOptionalU15 = .{ .value = 0, .is_null = true };
}