(I'm assuming knowledge of the Abrahams/Dimov example in this question.)
Assume there is some 3rd-party code in a header that like this, which you cannot modify:
template<class T> void f(T); // (1) base template 1
template<class T> void f(T *); // (2) base template 2
template<> void f<>(int *); // (3) specialization of (2)
The question is:
If I have been given the declarations above as-is, is it possible for me to now specialize the base template 1 for the case where T = int *
(for example)?
Or does the mere declaration of base template 2 imply that base template 1 can no longer be specialized (at least for pointers)?
You can overload (1) by explicitly specifying the template parameter in the angle-brackets after the function name (cf. C++11-Standard 14.7.3)
You could always try and then come to us. But I do not see why it wouldnt work. If
T = int*
it will work as you want. And hence no 2 would be a parameter ofint* *