title: Do constexpr values cause binary size to increase?
body: <p>I know that templatized types such as the below cost nothing on the compiled binary size:</p>
  <pre><code>template&lt;auto value&gt;
  struct ValueHolder{};
  </code></pre>
  <p>I'm making a program that will use a LOT of such wrapped types, and I don't think I want to be using <code>integral_constant</code>s for that reason, since they have a <code>::value</code> member.  I can get away with something more like:</p>
  <pre><code>template&lt;typename ValHolder&gt;
  struct Deducer;
  
  template&lt;auto value&gt;
  struct Deducer&lt;ValueHolder&lt;value&gt;&gt; {
      using Output = ValueHolder&lt;value+1&gt;;
  };
  </code></pre>
  <p>But it's definitely a bit more work, so I want to make sure I'm not doing it for nothing.  Note that we're talking TONS of such values (I'd explain, but I don't want to go on too far a tangent; I'd probably get more comments about &quot;should I do the project&quot; than the question!).</p>
  <p>So the question is: Do [static] constexpr values take any size at all in the compiled binary, or are the values substituted at compile-time, as if they were typed-in literally?  I'm pretty sure they DO take size in the binary, but I'm not positive.</p>
  <p>I did a little test at <code>godbolt</code> to look at the assembly of a constexpr vs non-constexpr array side-by-side, and everything looked pretty similar to me: <a href="https://godbolt.org/z/9hecfq" rel="nofollow noreferrer">https://godbolt.org/z/9hecfq</a></p>
  <pre><code>int main()
  {
      // Non-constexpr large array
      size_t arr[0xFFFF] = {};
  
      // Constexpr large array
      constexpr size_t cArr[0xFFF] = {};
  
      // Just to avoid unused variable optimizations / warnings
      cout &lt;&lt; arr[0] &lt;&lt; cArr[0] &lt;&lt; endl;
      return 0;
  }
  </code></pre>