title: Non-type template parameters
body: <p>I understand that non-type template parameters should be a constant integral expression. Can someone shed light why this is so?</p>
  <pre><code>template &lt;std::string temp&gt;
  void foo()
  {
       // ...
  }
  </code></pre>
  <blockquote>
  <pre><code>error C2993: 'std::string' : illegal type for non-type template parameter 'temp'.
  </code></pre>
  </blockquote>
  <p>I understand what a constant integral expression is. What are the reasons for not allowing non-constant types like <code>std::string</code> as in the above snippet ?</p>