you can do it even with enum class by having explicit cast. Enum class is a type so that we can avoid easy mistakes comparing different types and have a distinct namespace.