Does anyone understand why this doesn't work?
void f(T)(const(T)[] x, const(T)* y) {}
void test()
{
int*[] x;
const int* y;
f(x, &y);
}
error : template `f` is not callable using argument types `!()(int*[], const(int*)*)`
Candidate is: `f(T)(const(T)[] x, const(T)* y)`
Should this work? It looks like it should work to me.
...assuming T is inferred to be `int*`... which it's not clear why it wouldn't be?
The argument `y` is an exact match. The argument `x` requires a const promotion, and then T can be inferred correctly. Perhaps it's the order of that operation that it can't deal with?
I kinda reckon this is a bug...