make use of underlying_cast<int> when casting from an enum class.