title: c++ overloaded virtual function warning by clang?
body: <p>clang emits a warning when compiling the following code:</p>
  
  <pre><code>struct Base
  {
      virtual void * get(char* e);
  //    virtual void * get(char* e, int index);
  };
  
  struct Derived: public Base {
      virtual void * get(char* e, int index);
  };
  </code></pre>
  
  <p>The warning is:</p>
  
  <pre><code>warning: 'Derived::get' hides overloaded virtual function [-Woverloaded-virtual]
  </code></pre>
  
  <p>(the said warning needs to be enabled of course).</p>
  
  <p>I don't understand why. Note that uncommenting the same declaration in Base shuts the warning up. My understanding is that since the two get() functions have different signatures, there can be no hiding.</p>
  
  <p>Is clang right? Why?</p>
  
  <p>Note this is on MacOS X, running a recent version of Xcode. </p>
  
  <pre><code>clang --version
  Apple LLVM version 5.0 (clang-500.1.74) (based on LLVM 3.3svn)
  </code></pre>
  
  <p>Update: same behavior with Xcode 4.6.3.</p>