As a follow up of Iterating over a "packed" enum - #2 by quic5,
I want to use the builtin.Type.EnumField
as the index of an array but can’t find the way to cast it
What I did is
inline for (std.meta.fields(Eum)) |field| {
array[@intFromEnum(f)];
}
with the error
expected enum or tagged union, found ‘builtin.Type.EnumField’
Thanks,