title: Why is this call to member function ambiguous?
body: <p>Consider this class:</p>
  
  <pre><code>class Base{
  public:
      void func(double a) = delete;
      void func(int a) const {}
  };
  
  int main(){
      Base base;
  
      base.func(1);
      return 0;
  }
  </code></pre>
  
  <p>When compiled using clang++, it produces the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>clang++ --std=c++11 test.cpp 
  test.cpp:22:7: error: call to member function 'func' is ambiguous
      base.func(1);
  </code></pre>
  
  <p>With g++, a warning is produced:</p>
  
  <pre class="lang-none prettyprint-override"><code>g++ -std=c++11 test.cpp 
  test.cpp: In function ‘int main()’:
  test.cpp:22:13: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: base.func(1);
  </code></pre>
  
  <p>Why is this code ambiguous ? </p>