Strings as template arguments
<p>While the C++ standards doesn't allow to use string literals as template-arguments, it is allowed things like this:</p>

<p><strong>ISO/IEC 14882:2011</strong></p>

<blockquote>
  <p>14.3.2 Template non-type arguments [temp.arg.nontype]</p>
  
  <p>2 [ Note: A string literal (2.14.5) does not satisfy the requirements
  of any of these categories and thus is not an acceptable
  template-argument. [ Example:  </p>
  
  <p><code>template&lt;class T, const char* p&gt; class X { / ... / };</code> </p>
  
  <p><code>X&lt;int, "Studebaker"&gt; x1; // error: string literal as template-argument</code>  </p>
  
  <p><code>const char p[] = "Vivisectionist";</code><br>
  <code>X&lt;int,p&gt; x2; // OK</code>  </p>
  
  <p>—end example ] —end note ]</p>
</blockquote>

<p>So why the following code gives me an error in all compilers (gcc 4.7.2, MSVC-11.0, Comeau)?</p>

<pre><code>template &lt;const char* str&gt;
void foo() {}

int main()
{
   const char str[] = "str";
   foo&lt;str&gt;();
}
</code></pre>
