Feb 7, 2013 at 9:11pm
Hi,
Can anyone please tell me why the second function cannot be a specialization to the first ?? this code wouldnt run,
template <typename T> void f(T*) //1
template <> void f<int *>(int *) //2
but is fine if I include another template,
template <typename T> void f(T) //3
I am not able to understand why 2 can be specialization of 3 but not 1..
Last edited on Feb 7, 2013 at 9:11pm
Feb 7, 2013 at 9:21pm
http://www.gotw.ca/publications/mill17.htm
Wazzak
Feb 7, 2013 at 11:02pm
Specialize for int, not int *
Feb 13, 2013 at 8:05pm
Thank you very much guys...!!!