On 10/17/2014 10:44 AM, Tofu Ninja wrote:
Basicly what I am trying to do is have a function template that will
generate its parameters to be arrays of the types of a type tuple.

So for instance the parameters of f!(int, char) would be (int[], char[])...

No matter what I try, the compiler vomits all over me...

Perhaps string does not match cha[]? I made the elements const in the following code but you don't need them if you don't need to pass string:

void f(A, B)(const(A)[] as, const(B)[] bs)
{}

void main()
{
    f!(int, char)([42], "s");

    // And you don't need to specify the template parameters yourself:
    f([42], "s");
}

Ali

Reply via email to