std.builtin.TypeInfo.Pointer
is missing information on bit-alignment
#6846
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Currently,
@typeInfo(* align(a:b:c) u32).Pointer.alignment
is simply acomptime_int
representing the first (byte) alignment value, the other two are ignored.This limits generic reflection code in introspecting them. To even differentiate them from byte-aligned pointer types, you need to reconstruct the byte-aligned type and compare them.
I assume this extension (and inversely supporting generic creation via
@Type
) was already planned and just not a priority (aspacked struct
s still have more pressing bugs), so this is just a tracking issue.The text was updated successfully, but these errors were encountered: