This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10600: method lookup does not work correctly in dervied classes with virtual methods


Synopsis: method lookup does not work correctly in dervied classes with virtual methods

State-Changed-From-To: open->closed
State-Changed-By: bajo
State-Changed-When: Fri May  2 10:29:01 2003
State-Changed-Why:
    Not a bug, this is how C++ works: a function in a derived
    class completely shadows function(s) in a base class with
    the same name. Here C::test(int) is shadowing B::test(),
    hence the compilation error. Another workaround would be
    to put "using B::test;" inside the definition of class C.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10600


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]