title: Reason for using non-type template parameter instead of regular parameter?
body: <p>In C++ you can create templates using a non-type template parameter like this:</p>
  
  <pre><code>template&lt; int I &gt;
  void add( int&amp; value )
  {
    value += I;
  }
  
  int main( int argc, char** argv )
  {
    int i = 10;
    add&lt; 5 &gt;( i );
    std::cout &lt;&lt; i &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Which prints "15" to cout. What is the use for this? Is there any reason for using a non-type template parameter instead of something more conventional like:</p>
  
  <pre><code>void add( int&amp; value, int amount )
  {
    value += amount;
  }
  </code></pre>
  
  <p>Sorry if this has already been asked (I looked but couldn't find anything).</p>