Common Error 22.1 (cont.)
Coercion doesn't happen. You can't mix types.
- Consider:
double e = max( 2, 3.13 );
// Error - cannot infer type argument
- Type argument(s) may be supplied explicitly:
double e = max<double>( 2, 3.13 );
// OK - integer will be converted to a double
prev
|top
|next