The answer depends on the types in question. In your specific example, the standard ensures that sizeof(double) >= sizeof(float) so the resulting double * float will always be double . (this is a rule inherited from the C language, and, as a rule, the same thing in many other languages ββthat come from C)
When initializing a variable with the auto keyword, the type of initialization expression is determined - regardless of whether it is returned from the return function, calculation, type decltype, etc. A type depends on implicit and explicit conversions for the types you use.
Ben cottrell
source share