Implicit conversions - cppreference.com
When an expression is used in the context where a value of a different type is expected, conversion may occur: Conversions take place in the following situations: Note that actual assignment, in addition to the conversion, also removes extra range and precision from floating-point types and prohibits overlaps; those characteristics do not apply to conversion as if by assignment. In a function call expression when the call is made to Each argument of integer type undergoes integer promotion (see below), and each argument of type float is implicitly converted to the type double Note that float complex and float imaginary are not promoted to double complex and double imaginary in this context. The arguments of the following arithmetic operators undergo implicit conversions for the purpose of obtaining the common real type, which is the type in which the calculation is performed: The result type is determined as follows: As always, the result of a floating-point operator may have greater r
When an expression is used in the context where a value of a different type is expected, conversion may occur: Conversions take place in the following situations: Note that actual assignment, in addition to the conversion, also removes extra range and precision from floating-point types and prohibits overlaps; those characteristics do not apply to conversion as if by assignment. In a function call expression when the call is made to Each argument of integer type undergoes integer promotion (see below), and each argument of type float is implicitly converted to the type double Note that float c
Explore this link on the map →