Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


The 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: