template <typename T>
void f (T t){}
int main(){
unsigned int ui = 0;
signed int si = 0;
f(si + ui);// call void f<unsigned int>(unsigned int)
return 0;
}
Otherwise, one type between T1 and T2 is an signed integer type S, the other type is an unsigned integer type U. Apply the follwing rules:
If the integer conversion rank of U is greater than or equal to the integer conversion rank of S, C is U.
The rank of any unsigned integer type equals the rank of the corresponding signed integer type.