/* One best match using promotion. Two others at a lower level using standard conversions. */ #include #include using namespace std; void f(int i){ // Match: standard conversion cout << "f(int)" << endl; } void f(long int i){ // Match: standard conversion cout << "f(long int)" << endl; } void f(double d){ // Match: promotion cout << "f(double)" << endl; } int main(){ float c = 5.5; f(c); // A single best match: f(double) // The float to double promotion is in another category than // float -> int and float -> long int. }