On Wednesday, 20 May 2015 at 09:35:48 UTC, Jonathan M Davis wrote:
Well, if printVal!(int*)(px);prints 100, then that's a bug. It should print the address. In fact, it should be _impossible_ for the second overload of printVal to ever beinstantiated
IMHO thats not true, it should print 100. This is what spec say.
void printVal(T : T*)(T* t) {
writeln(*t);
}
T is deduce to be int so we have
void printVal(int* t) {
writeln(*t);
}
which will print value not address
