title: more than one instance of function template matches the argument list
body: <pre><code>#include &lt;iostream&gt;
  using std::cout;
  using std::endl;
  
  #include &lt;string&gt;
  using std::string;
  
  template &lt;class T&gt;
  T max(T const&amp; t1, T const&amp; t2) {
      return t1 &lt; t2 ? t2 : t1;
  }
  
  int main() {
      cout &lt;&lt; max(1, 2) &lt;&lt; endl;
      cout &lt;&lt; max&lt;double&gt;(1.2, 2) &lt;&lt; endl;
      string s1 = "hello";
      string s2 = "world";
   --&gt;   cout &lt;&lt; max(s1, s1) &lt;&lt; endl;
  }
  </code></pre>
  
  <p>On the line with arrow, it complains about:
  "more than one instance of function template "max" matches the argument list: -- function template "const _Tp &amp;std::__1::max(const _Tp &amp;__a, const _Tp &amp;__b)"-- function template "T max(const T &amp;t1, const T &amp;t2)" -- argument types are: (std::__1::string, std::__1::string)"</p>
  
  <p>I am confused since both of them are string, and not sure what else the template can match of.</p>