Why does a value of an enum with a fixed underlying type of char resolve to fct(int) instead of fct(char)?
This problem came up when answering this question about overload resolution with enums . While the case for long long was definitely a bug in MSVC2012NovCTP (according to the standard text and a test with gcc 4.7.1), I cannot figure out why the following behavior occurs: #include <iostream> enum charEnum : char { A = 'A' }; void fct(char) { std::cout << "fct(char)" << std::endl; } void fct(int) { std::cout << "fct(int)" << std::endl; } void fct(long long) { std::cout << "fct(long long)" << std::endl; } int main() { fct('A'); fct(A); } Both MSVC2012NovCTP and gcc 4.7.1 agree on this output: fct