title: Allocating memory in stack via "Value Template Argument" vs. regular array
body: <p>I'm studying <a href="https://learning.oreilly.com/library/view/a-tour-of/9780134998053/ch06.xhtml" rel="nofollow noreferrer"><em>A Tour of C++</em></a> and one of the demonstrations for <strong>Value Template Argument</strong> is to create a template class to arbitrarily allocate Buffer in the stack. I fail to see how it is different than simply create an array (i.e. int buf[100]) which will also be allocated from the stack?</p>
  
  <blockquote>
    <p>Value arguments are useful in many contexts. For example, Buffer
    allows us to create arbitrarily sized buffers with no use of the free
    store (dynamic memory):</p>
  </blockquote>
  
  <pre><code>Buffer&lt;char,1024&gt; glob;  // global buffer of characters (statically allocated)
  
  void fct()
  {
       Buffer&lt;int,10&gt; buf; // local buffer of integers (on the stack)
       // ...
  }
  </code></pre>