Is it possible to generate an argument list that contains pointers to local variables at compile time?

For example, consider following code:

template Repeat(alias int N, alias variable)
{
    // Magic

    alias Repeat = /* Even more magic */;
}

void foo(int* x, int* y, int* z)
{
    // [...]
}

void fun()
{
    int bar = 42;

foo(Repeat!(3, bar)); // want to replace it with &bar, &bar, &bar
}

Reply via email to