title: Why can't I call any other overloads of the same function while inside a particular function overload in C++?
body: <p>It's best to illustrate this question with a simple program.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  #include &lt;utility&gt;
  
  void printPoint(std::pair &lt;int, int&gt; point) {
      printPoint(point.first, point.second);
  }
  
  void printPoint(int x, int y) {
      std::cout &lt;&lt; x &lt;&lt; ' ' &lt;&lt; y &lt;&lt; std::endl;
  }
  
  int main(void) {
      std::pair &lt;int, int&gt; point(2, 3);
      printPoint(point);
      return 0;
  }
  </code></pre>
  
  <p>I would like for the two <code>printPoint</code> functions to accomplish the same thing by taking advantage of overloads. However, while inside the scope of a particular overload of the <code>printPoint</code> function (in this case, the single-argument one), the compiler only lets me use that particular overload, so the code does not compile.</p>
  
  <p>Why is this? Further, is there any way to mitigate this problem so that I don't have to re-write the same function body twice?</p>