Just imagine how your arguments would be passed.
If it is passed as 1.2 and 2.2 to the (int,int) function then it would to truncated to 1 and 2.
If it is passed as 1.2 and 2.2 to the (float,float) it will be processed as is.
So here is where the ambiguity creeps in.
I have found two ways to solve this problem.
First is the use of literals:-
Secondly, and the way I like to do it, It always works (and can also be used for C++'s default conversion and promotion).
int a=1.2, b=2.2;
float a=1.2, b=2.2;
So instead of using actual DIGITS. It is better to declare them as a type first, then overload!
See now, if you send it as (1.2,2) or (1,2.2) then compiler can simply send it to the int function and it would work.
However, to send it to the float function the compiler would have to promote 2 to float. Promotion only happens when no match is found.
Computer Science with C++
Chapter: Function Overloading