Unless you pass type to FuncType you are using a more specific type what I mean is to use:
comptime funcs: []type,
What about this:
pub noinline fn run_count_cross(
comptime opt: Options,
name: []const u8,
invokes: usize,
comptime funcs: anytype, // tuple of function bodies
comptime args: anytype, // tuple of arguments
[funcs.len * args.len]Data {
Also take a look at this topic where we played around with similar ideas: Making Overloaded Function Sets Using Comptime
The basic gist is: keep the original tuple of function bodies and just index into it, deconstruct it or iterate over it wherever you need it. Use @TypeOf(funcs)
to get the type and check that it actually is a tuple, otherwise create a compile error.