Narrowing conversion from char to double
问题 Why there is a warning narrowing conversion from char to double I know already that for const char there will be no warning. There are a lot of answers about that. But I would like to know, why for non-const char there is a "might-narrow" warning? Is it possible that on some systems mantissa is not big to perfectly represent char? int main() { char c{7}; double a{c}; } 4:13: warning: narrowing conversion of 'c' from 'char' to 'double' inside { } [-Wnarrowing] 回答1: It is narrowing because the