If we have:
t1 x = (t1) cond ? y : z;
and y and z are of differeing, though compatible, types - clang 21 complains:
warning: implicit conversion increases floating-point precision: 'double' to
'long double' [-Wdouble-promotion]
Indeed, we do have two cases of this happening, when choosing between double and long_double interpretation of the next parameter.
So, let's make it:
t1 x = cond ? (t1) y : (t1) z;
to shut clang up.
If we have:
and
yandzare of differeing, though compatible, types - clang 21 complains:Indeed, we do have two cases of this happening, when choosing between
doubleandlong_doubleinterpretation of the next parameter.So, let's make it:
to shut clang up.