title: Function Overloading using Enum
body: <p>I was going through examples of function overloading and came across the following example:</p>
  
  <pre><code>#include &lt;string&gt;
  #include&lt;iostream&gt;
  
  using namespace std;
  
  enum e1 {a1, b1, c1};
  enum e2 {a2, b2, c2 = 0x80000000000 };
  
  string format (int){
      cout&lt;&lt;1;
  }
  string format (unsigned int){
      cout&lt;&lt;2;
  }
  
  
  int main () { 
      format (a1);
      format (a2);
      return 0; 
  }
  </code></pre>
  
  <p>Using gcc 5.4.0, <code>format(a1)</code> compiles and <code>format(int)</code> is called (displays 1 as output). But, when <code>format(a2)</code> is compiled, the following error appears:</p>
  
  <pre><code> call of overloaded 'format(e2)' is ambiguous
  </code></pre>
  
  <p>Shouldn't <code>format(a2)</code> and <code>format(a1)</code> have the same output/error?</p>