test "designated inits ideas" { const E = enum { a, b, c, d }; const ss = .{ .{ .a, 10 }, .{ .c, 20 }, .{ .b, 200 }, .{ .d, 255 }, }; inline for (ss) |s| { std.debug.warn("s {}\n", .{s}); } const numSs = std.meta.fields(E).len; std.debug.warn("numSs {}\n", .{numSs}); const arr: [numSs]u8 = undefined; }