Why does this:
#include <iostream>
using namespace std;
template <class T> void f(T t) {cout << "A";}
template <> void f(float x) {cout << "B";}
void f(float x) {cout << "C";}
int main()
{
float x;
f(x);
f<>(x);
f<float>(x);
return 0;
}
display this: CBB ?
It's very unclear for me especially why f<float>(x); displays B. Could you tell me some more general rules about the priority of calling template and non template functions with the same name ?