|
|
|
|
|
|
getSmaller(7, 2.89)
must be fully known before the compiler can generate code for it. In your sample code, the type is unknown because the compiler is not able to infer the value of the template parameter R from the call's arguments, and you haven't passed it explicitly as a template parameter.
|
|
|
|
If both operands are of arithmetic or enumeration types, the usual arithmetic conversions (covered in Arithmetic Conversions) are performed to convert them to a common type. |