title: 3.4.1 Unqualified name lookup and function overloading
body: <p>I've read about unqualified name lookup and I've one misunderstanding about function overloading. In the N3797 said:</p>
  
  <blockquote>
    <p>In all the cases listed in 3.4.1, the scopes are searched for a
    declaration in the order listed in each of the respective categories;
    name lookup ends as soon as a declaration is found for the name.</p>
  </blockquote>
  
  <p>Consider the following code snippet:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void foo(int)
  {
      printf("foo(int)\n");
  }
  
  void foo()
  {
      printf("foo(void)\n");
  }
  
  int main()
  {
      foo();
  }
  </code></pre>
  
  <p>This program obviously printed <code>foo(void)</code>. In this case the name <code>foo</code> are searched for the declaration in the scope. And let the first founded defenition of the foo is </p>
  
  <pre><code>void foo(int)
  {
      printf("foo(int)\n");
  }
  </code></pre>
  
  <p>Why is the program continue to search the best overload for the called function after the name is found.</p>