title: What is the difference between assert and static_assert?
body: <p>I know that <code>static_assert</code> makes assertions at compile time, and <code>assert</code> - at run time, but what is the difference in practice? As far as I understand, deep down they are pieces of code, like</p>
  
  <pre><code>if (condition == false) exit();
  </code></pre>
  
  <ul>
  <li>Can someone give me an example of where <strong>only</strong> <code>static_assert</code> will work, or <strong>only</strong> <code>assert</code>?</li>
  <li>Do they do anything a simple <code>if</code> statement can't do?</li>
  <li>Is it bad practice to use them?</li>
  </ul>