title: function template overloading clang++
body: <p>g++ 4.8.1 and clang++ 3.4 give different results for next code: </p>
  
  <pre><code>// simplified code from a Logger module
  #include &lt;iostream&gt;
  
  template&lt;class T&gt; void tf(const T*) {  // clang++ 
      std::cout &lt;&lt; "void tf(const T*)\n"; 
  }
  
  template&lt;class T&gt; void tf(T) {  // g++
      std::cout &lt;&lt; "void tf(T)\n"; 
  }
  
  int main(){ 
      typedef std::ios_base&amp; (*ph)(std::ios_base&amp;);
      ph p = std::hex;
      tf(p); // or just tf(std::hex)
  }
  </code></pre>
  
  <p>I can't figure out which variant is correct (C++ 03).</p>