title: Killing Magic Numbers: "const int" vs "constexpr int" (or is there no difference in the end)
body: <p>Let's say I have a <code>magic number</code> I want to get rid off...</p>
  
  <pre><code>//whatever.cpp
  
  for (int i = 0; i &lt; 42; i++)
  {
      //...
  }
  </code></pre>
  
  <p>Reasonably I could kill it in two ways:</p>
  
  <p>Either with <code>const int SOMETHING_SOMETHING_MEANING_OF_LIFE = 42</code><br>
  or with <code>constexpr int SOMETHING_SOMETHING_MEANING_OF_LIFE = 42</code><br>
  in the source <code>.cpp</code> file.</p>
  
  <p>Is there any meaningful difference between the two in this case (I recall the compiler deducing that - in either case - that the value does not change and thus the <code>42</code> is actually hardcoded in the resulting loop/unrolled loop/whatever machine-code) or does it come down to personal taste?</p>
  
  <p>In a related issue: what if the <code>magic number</code> (and thus the thing that replaces it) were declared in a header (<code>.h</code>) file instead of a source (<code>.ccp</code>) file - would that change things (and if so, how)?</p>