I thought zig was structurally typed ?
src/util.zig:32:12: error: expected type 'util.Map(.{ "blogs/index.html", "blogs/subdir/index.html" },[]const u8)', found 'util.Map(.{ "blogs/index.html", "blogs/subdir/index.html" },[]const u8)'
context code ```cpp
const std = @import("std");
const t = std.builtin.Type;
pub fn Map(comptime keys: []const []const u8, comptime V: type) type {
var fields: [keys.len]t.StructField = undefined;
for (keys, 0..) |key, i| {
fields[i] = t.StructField{
.name = key,
.type = V,
.default_value = null,
.is_comptime = false,
.alignment = 16,
};
}
return @Type(.{
.Struct = .{
.layout = .Auto,
.fields = &fields,
.decls = &.{},
.is_tuple = false,
},
});
}
pub fn MapWith(comptime keys: []const []const u8, comptime V: type, comptime values: []const V) Map(keys, V) {
var map: Map(keys, V) = undefined;
inline for (keys, 0..) |key, i| {
@field(map, key) = values[i];
}
return map;
}