How do I cast an int to an enum in C++?
For example:
enum Test { A, B }; int a = 1;
How do I convert a to type
a
int i = 1; Test val = static_cast(i);