title: C++ Overload Resolution, userdefined conversion and function template
body: <p>With g++ 3.4 and 4.7 I observed the following strange behavior:</p>
  
  <p>A function template does not match if a user defined conversion is necessary, where a plain function will.
  I could not find the corresponding rule in the C++98 Standard. Is g++ correct, (as I assume)? Or is it a bug?</p>
  
  <pre><code>template &lt;class T&gt;
  int x(auto_ptr_ref&lt;T&gt; p)
  {
    return 1;
  }
  // this would match
  /*
  int x(auto_ptr_ref&lt;int&gt; p)
  {
     return 2;
  }
  */
  void dummy()
  {
    cout &lt;&lt; x(auto_ptr&lt;int&gt;()) &lt;&lt; endl;
  }
  </code></pre>