So I have the following code:
void invert(T)(T[2][] arr)
{
auto result = new T[2][arr.length];
foreach (i, v; arr)
result[i] = [-v[0], -v[1]];
return result;
}
and I call it:
invert([[5, 6], [6, 7]]);
and I get:
test.d(94):Error: templatetest.invert(T)does not match any function template declarationtest.d(94):Error: templatetest.invert(T)cannot deduce template function from argument types!()(int[][])
What's the easiest way to fix this without losing the auto-inference feature?