15 ms·
Does this coerce distinct type a and b, or just fail if they are different types? The C one will evaluate the comparison / trinary expression via the usual int
by loeg 9y ago
Does this coerce distinct type a and b, or just fail if they are different types? The C one will evaluate the comparison / trinary expression via the usual integer promotion rules.
- gmueckl 9y agoThe C++ version does not promote types. The language is generally much stricter about implicit type conversions, so this is very much in line with the language design.