Suppose we have
enum class Month {jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec};
Each value is an int, 0 to 11. Then I expect variable of type Month to hold only these enumerated values. So here's the only OK way to create a variable:
Month m = Month::may;
But here are some other ways that language allows:
Month m1 = Month(12345);
Month m2 = static_cast<Month>(12345);
which is somewhat disappointing. How do I allow only the first way? Or how do people cope with poor enums in C++?