Although... now that I think about it, this should really be done as a language feature, and not through some inefficient CTFE trick. So, I should really be able to just write this:

int[5] arr = [ 1, 3, 5, 7, 11 ];

void foo(T...)(T values) { }

void bar(T...)(T values)
{
    foo((arr[values] * 10)...);
}

void main()
{
    bar(1, 3, 4);
}

Reply via email to