Sorry, here's a more complete example: import std.stdio; import std.traits;
void test(alias F)(int x, int y)
{
ReturnType!(F) otherFunc(ParameterTypeTuple!(F) args)
{
typeof(return) result;
result = args[0] + args[1] * 2.5;
return result;
}
writeln(otherFunc(x, y));
}
double foo(int x, int y)
{
double result;
return x + y * 2.5;
}
void main()
{
test!(foo)(4, 5);
}
