Tag: integer-promotion
-
Why is ‘char -> int’ promotion, but ‘char -> short’ is conversion (but not promotion)?
22 I’ve read cppreference.com’s implicit conversion: Integral promotion: prvalues of small integral types (such as char) may be converted to prvalues of larger integral types (such as int). […] Note that all other conversions are not promotions; for example, overload resolution chooses char -> int (promotion) over char -> short (conversion). The conversion from char…