Am 24.03.2011 11:49, schrieb Morlan:
I did not ask what to do to compile it. I knew that 54L would do. The problem is that in the example I explicitely specify the template parameter as long* so there is no reason for the compiler to try and guess T from the type of the function argument. There is something wrong here.
I agree.
void fun(long l) {}
void main() {
long foo = 54;
fun(42);
}
works, so that should work without an explicit cast as well.
Cheers,
- Daniel
