title: c++: no matching function for call, but the candidate has the exact same signature
body: <p>g++ complains about</p>
  
  <pre><code>myclass.cxx:185: error: no matching function for call to 'IMyInterface::doSomething(const SomeClass*, unsigned int)'
  IMyInterface.h:34: note: candidates are: virtual void IMyInterface::doSomething(const SomeClass*&amp;, unsigned int)
  </code></pre>
  
  <p>when I call</p>
  
  <pre><code>m_instanceOfInterface-&gt;doSomething((const SomeClass*)0,(unsigned int)1);
  </code></pre>
  
  <p>Any pointers to why? It seems to me that g++ is seeing exactly the same signature between what is declared and what is being called, but still complains about no matching function found.</p>
  
  <p>I can call, in the same context, another function of <code>IMyInteface</code>, <code>IMyInterface::doSomethingElse(float&amp; p)</code>. So somehow the <code>const</code> is the problem?</p>
  
  <hr>
  
  <p>I did not pass the NULL pointer and cast a constant integer just for fun... originally I have </p>
  
  <pre><code>m_instanceOfInterface-&gt;doSomething((const SomeClass*)m_someDerivedClass,m_anInteger);
  </code></pre>
  
  <p>and got the same error. So I decided to clarify things with g++ by giving some explicit arguments. I can assure you that the NULL pointer is NOT the problem - although understandably we all cringed a bit when seeing a NULL being passed with <code>const</code> :)</p>