title: More specific overload not called
body: <p>Given the following two functions, I would expect the first overload to be called if I pass it an <code>std::pair&lt;const char*, std::size_t&gt;</code>, since it is more specific than a generic <code>T</code>.</p>
  
  <pre><code>void foo(const std::pair&lt;const char*, std::size_t&gt;&amp; p)
  {
      std::cout &lt;&lt; "pair" &lt;&lt; std::endl;
  }
  
  template &lt;class T&gt;
  void foo(const T&amp; v)
  {
      std::cout &lt;&lt; "generic" &lt;&lt; std::endl;
  }
  
  int main()
  {
      const char* s = "abc";
      foo(std::make_pair(s, std::size_t(3)));
  }
  </code></pre>
  
  <p>However, this program outputs:</p>
  
  <pre><code>generic
  </code></pre>
  
  <p>Why is the second overload called, instead of the overload that explicitly takes a <code>pair</code>?</p>
  
  <p>Is this a compiler issue?  I happen to be using a pretty old compiler (GCC 4.1.2) at the moment.</p>
  
  <p>Hmm... it probably IS a compiler issue:</p>
  
  <p><a href="http://ideone.com/97XwwZ">http://ideone.com/97XwwZ</a></p>