In C ++, nothing is called unsigned float . float always signed
According to the C ++ Standard Table in section 7.1.5.2, βsignedβ is itself a synonym for βintβ. Therefore, the compiler should inform you of the error that signed or unsigned not applicable for float .
Check here , even Ideone reports an error.
error: 'signed' or 'unsigned' invalid for 'j'
Are you misinterpreting this error as an error in the ambiguos function ambiguos ?
If you release unsigned float , the compiler will not be able to see any corresponding function call that has unsigned int and float arguments, so it pushes unsigned int to int and allows function call with int and float arguments, there is no ambiguity.
Here is an example code for Ideone.
Alok save
source share