title: Avoid cast while comparing enum class with int
body: <p>I finally <a href="https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum">convinced</a> my co-worker to use <code>enum class</code> instead of the old <code>enum</code>.</p>
  
  <p>However, when comparing <code>int</code> to a enum class value a cast is necessary now. At least IntelliSense says so:</p>
  
  <p><a href="https://i.stack.imgur.com/4hs72.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4hs72.png" alt="enter image description here"></a></p>
  
  <p>Because of that unecessary cast (since the underlying type is int) she now wants to stay with the old enum...</p>
  
  <p>Please help me out with arguments in that discussion. Maybe there is a technical way to avoid the cast?</p>