You are right. enum class is not convenient if it needs these operation. Or should override these operation.