My C++ compiler warns about implicit floating-point conversions, as in
some_long_double_value() > 1.0
While I understand that the double constant 1.0
is implicitly converted to a long double
value for the sake of comparison, I don't see why this is something to warn about.
I understand that implicit floating-point conversion might be undesirable in some situations, such as, say, overload resolution. But I think for the sake of comparison this is completely harmless. Or am I missing something here, such as a border case or special hardware situations?