enum class BankAccountState { ZeroBalance, Active, Overdrawn, Closed, }; void f(BankAccountState state) { } int main(int, const char **) { f(5); return 0; }
Standard input is empty
prog.cpp: In function 'int main(int, const char**)':
prog.cpp:15:5: error: cannot convert 'int' to 'BankAccountState' for argument '1' to 'void f(BankAccountState)'
f(5);
^
Standard output is empty