title: C++ overloaded function as template argument
body: <p>the simplified version of my code is here</p>
  
  <pre><code>int foo(int x)
  {
    return x;
  }
  
  int foo(int x, int y)
  {
    return x+y;
  }
  
  template&lt;typename unary_func&gt;
  int bar(int k, unary_func f)
  {
    return f(k);
  }
  
  int main()
  {
    bar(3, foo);
    return 0;
  }
  </code></pre>
  
  <p>Is there a way to tell the compiler what I want to pass as argument is the first `foo'?</p>