title: Can static_cast throw an exception in C++?
body: <p>Is it safe to assume that static_cast will never throw an exception?</p>
  
  <p>For an int to Enum cast, an exception is not thrown even if it is invalid. Can I rely on this behavior? This following code works.</p>
  
  <pre><code>enum animal {
    CAT = 1,
    DOG = 2
  };
  
  int y = 10;
  animal x = static_cast&lt;animal&gt;(y);
  </code></pre>