title: Argument-dependent lookup in C++
body: <p>How does this work? Is it related to ADL?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;typename T&gt;
  struct A
  {
      friend void f(T x)
      {
          std::cout &lt;&lt; "A\n";
      }
  };
  
  int main()
  {
      f(new A&lt;void*&gt;());
  }
  </code></pre>
  
  <p>Can somebody tell me why i can't use something like</p>
  
  <pre><code>f(A&lt;int&gt;());
  </code></pre>