From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2581 invoked by alias); 16 Nov 2005 15:08:36 -0000 Received: (qmail 2572 invoked by uid 48); 16 Nov 2005 15:08:33 -0000 Date: Wed, 16 Nov 2005 15:08:00 -0000 Subject: [Bug c++/24893] New: inherited polymorphic template class X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fmaerten at igeoss dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-11/txt/msg02298.txt.bz2 List-Id: Hi all, We just found a bug while compiling the following code. The derived template class doens't know the pure virtual method from its parent class when this template class has a method with the same name, but with different arguments: class A { public: virtual void doit() = 0 ; } ; template class B: public A { public: virtual void doit(double) {} } ; class C: public B { public: virtual void doit() {} } ; int main() { A* a = new C ; B* b = new C ; a->doit() ; // ok // Compile error with gcc-3.4.3: // error: no matching function for call to `B::doit()' // note: candidates are: void B::doit(double) [with T = double] b->doit() ; } -- Summary: inherited polymorphic template class Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fmaerten at igeoss dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24893