/* Matches using promotions. */ #include #include using namespace std; void f(long int i){ // Match: promotion cout << "f(long int)" << endl; } void f(short int i){ // Match: promotion cout << "f(short int)" << endl; } int main(){ int c = 5; f(c); // error: call of overloaded f(int&) is ambiguous // note: candidates are: void f(long int) // note: void f(short int) }