When I have a couple of partial specializations of template classes, and I instantiate a object of that template class, TAD tries to find the most specialized version of the class that fits the template arguments,and that class gets instantiated, that is how I understood it.
But what happens with functions, when there are several overloaded template functions with the same number of function parameters, and arbitrary number of template parameters. How is a function call resolved, are all the functions that can be matched with TAD sent to overload resolution, or is only the most specialized function sent to overload resolution?
For example, how does the compiler know to call the overload for vector *?
template <typename A> void f(vector<A> *g){}
template <typename B> void f(B*){}
template <typename C> void f(C){}
int main(){
vector<int> vec;
f(&vec);
return 0;
}