Quote Originally Posted by superbonzo View Post
It's not a "best match" because it's not even a legal definition. The signature of a function template specialization must match the signature of the to be specialized function template.

So you can write

Code:
template <> char* maxn<char>(char* str[], int ct); // illegal, it's a potential specialization of a function template with signature template <class  T> T* maxn(T* str[],int);

template <> char* maxn<char*>(char* str[], int ct); // ok, it's a specialization of a function template with signature template <class  T> T maxn(T str[],int);

template <> char* maxn(char* str[], int ct); // ok, as above; but this time the type is deduced

char* maxn(char* str[], int ct); // ok, a function overload
Oh, thanks for the clarification, but I think using the first form is the best? because type deduction isn't standard C++ as far as I know, thank you very much for you help.