title: C++ overload resolution - ambiguous match
body: <p>I was attempting to experiment with some basic overload resolution concepts using the following test code:</p>
  
  <pre><code>void foo()
  {
     void F(int x, int y);        // F1
     void F(char x, double y);    // F2
     F('A', 5);
  }
  </code></pre>
  
  <p>I've "tried" to comprehend the applicable parts of the C++17 standard and I also looked at cppreference.com.  My understanding is that the conversion sequence for F1 consists of a Promotion and an Exact Match, whereas the conversion sequence for F2 consists of an Exact Match and a Conversion.  cppreference.com states, in part, that</p>
  
  <pre><code>...
  F1 is determined to be a better function than F2 if implicit conversions for all 
  arguments of F1 are not worse than the implicit conversions for all arguments of 
  F2, and
  1) there is at least one argument of F1 whose implicit conversion is better than 
  the corresponding implicit conversion for that argument of F2
  ...
  </code></pre>
  
  <p>Based upon all of the above I thought that F1 should be accepted as the best candidate because the worst conversion for F1 is better than the worst conversion for F2.  However, both the Microsoft and minGW compilers generate an "ambiguous" match error.  So obviously I'm missing something.  I would appreciate an explanation of what I am missing and a reference to that information in C++17.  Thanks!</p>