title: pass generic function to a template
body: <p>I have the following question:</p>
  
  <p>When I pass a template function to another one it doesn't work, but when I pass a normal one to template function it compiles normally, for example:</p>
  
  <pre><code>template&lt;class It, class Pred&gt;
  It findif(It begin,It end, Pred pr){
      while (begin!=end &amp;&amp; !pr(*begin))
          begin++;
      return begin;
  }
  bool p(const string&amp; s){
      /* some code */
  }
  </code></pre>
  
  <p>when I pass p to findif it works,but this doesn't:</p>
  
  <pre><code>template&lt;class It, class Pred&gt;
  It findif(It begin,It end, Pred pr){
      while (begin!=end &amp;&amp; !pr(*begin))
          begin++;
      return begin;
  }
  template&lt;class T
  bool p(const T&amp; s){
      /* some code */
  }
  </code></pre>