Better:

void test(alias F)(ParameterTypeTuple!(F) args)
{
    ReturnType!(F) otherFunc(ParameterTypeTuple!(F) args)
    {
        typeof(return) result;

        result = args[0] + args[1] * 2.5;

        return result;
    }

    return otherFunc(args);
}

double foo(int x, int y)
{
    double result;
    return x + y * 2.5;
}

void main()
{
    writeln(test!(foo)(4, 5));
}

Reply via email to