[Bug c++/35192] Base method overloading hides base public method in derived class.

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 14 07:51:00 GMT 2008



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-02-14 07:50 -------
This is what the C++ standard says.
overloading g will hide all of g functions in the base class.  if you want not
to have them hidden you have to add an using statement.
Like:

class Derived : public Base {
public:
  using Base::g;
 protected:
  virtual void g(int i, int j) {}
};


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35192



More information about the Gcc-bugs mailing list