title: c++ template function
body: <p>I have following code: </p>
  
  <pre><code>void myfunc() 
  { 
  } 
  template &lt;typename T&gt; 
  void check() 
  { 
  } 
  
  template &lt;typename T&gt; 
  void checkT (T) 
  { 
      check&lt;T&gt;(); 
  } 
  </code></pre>
  
  <p>and so if I have in main function a call to <code>checkT(myfunc)</code> then that compiles, but if I have <code>check&lt;myfunc&gt;()</code> that doesn't work although it directly calls the first version. Can you please explain why it is so? The error is </p>
  
  <blockquote>
    <p>error: no matching function for call to 'check()'</p>
  </blockquote>
  
  <p>Thanks!</p>