How to automatically convert strongly typed enum into int?

Strongly typed enums aiming to solve multiple problems and not only scoping problem as you mentioned in your question: Provide type safety, thus eliminating implicit conversion to integer by integral promotion. Specify underlying types. Provide strong scoping. Thus, it is impossible to implicitly convert a strongly typed enum to integers, or even its underlying type … Read more