#Iterate over all values in an enum
1 messages · Page 1 of 1 (latest)
not at pc so can't confirm but I believe std.meta.fields
@typeInfo(T).Enum.fields
Thanks!
there's also std.enums.values(E) which actually returns []const E
For anyone that comes to this thread later, the first two options are for comtime int values while the last one (std.enums.values) is can be runtime!