pub fn view(self: *World, comptime Components: anytype, tags: []Entity) EcsError!View(Components, tags.len) {
assert(@typeInfo(@TypeOf(Components)) == .Struct);
assert(Components.len > 0 and Components.len <= std.math.maxInt(ComponentIx));
var components: [Components.len + tags.len]Entity = undefined;
inline for (Components, 0..) |T, ix| {
components[ix] = try self.componentFromType(T);
}
for (tags, Components.len..) |tag, ix| {
components[ix] = tag;
}
return .{
.world = self,
.components = components,
};
}
I will know the length of tags a comptime, but not the values