title: C++11 constexpr function's argument passed in template argument
body: <p>This used to work some weeks ago:</p>
  
  <pre><code>template &lt;typename T, T t&gt;
  T            tfunc()
  {
      return t + 10;
  }
  
  template &lt;typename T&gt;
  constexpr T       func(T t)
  {
      return tfunc&lt;T, t&gt;();
  }
  
  int main()
  {
      std::cout &lt;&lt; func(10) &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>But now <code>g++ -std=c++0x</code> says:</p>
  
  <pre><code>main.cpp: In function ‘constexpr T func(T) [with T = int]’:
  main.cpp:29:25:   instantiated from here
  main.cpp:24:24: error: no matching function for call to ‘tfunc()’
  main.cpp:24:24: note: candidate is:
  main.cpp:16:14: note: template&lt;class T, T t&gt; T tfunc()
  main.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
  </code></pre>
  
  <p><code>clang++ -std=c++11</code> says that template's parameters of <code>tfunc&lt;T, t&gt;()</code> are ignored because invalid.</p>
  
  <p>Is that a bug, or a fix ?</p>
  
  <p>PS:</p>
  
  <p><code>g++ --version</code> => <code>g++ (GCC) 4.6.2 20120120 (prerelease)</code></p>
  
  <p><code>clang++ --version</code> => <code>clang version 3.0 (tags/RELEASE_30/final)</code> (3.0.1)</p>