title: Color(int, int, int) vs Color(float, float, float) ambiguous call
body: <p>How can I resolve the ambiguous call between these two in C++?</p>
  
  <pre><code>Color(int, int, int)
  Color(float, float, float)
  </code></pre>
  
  <p>It is both ambiguous when the values are hardcoded i.e. <code>Color(1, 2, 3)</code> and when they are variables <code>Color(r, g, b)</code>. Why wouldn't the compiler resolve according to data type? In variable form?</p>
  
  <p>EDIT:
  Sorry, too much C++ makes me forget there's a other languages.
  And there is not much "full code" that was all about it.</p>
  
  <pre><code>float x, y, z;
  int r, g, b;
  Color(1, 2, 3); // ambiguous
  Color(1.0, 2.0, 3.0); // ambiguous
  Color(r, g, b); // ambiguous  &lt;--- this one is a real pain
  Color((int)r, (int)g, (int)b); // ambiguous
  Color(x, y, z); //OK
  Color(1u, 2u, 3u); //OK
  Color(1.0f, 2.0f, 3.0f); //OK
  </code></pre>