[Bug c++/24893] New: inherited polymorphic template class
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
[Bug c++/24654] New: friend class using plain scope resolution operator
The following code must now use the plain scope resolution operator in order to work with gcc4. Is it a regression or a conformance to the specs? class Initializer ; namespace NS { class A { // Now must use ::Initializer with gcc4 in order to compile // If not, the following error occurs: // error: 'static void NS::A::initialize()' is private // // Using Initializer works with gcc 3.4.3 friend class ::Initializer ; static void initialize() {} } ; } class Initializer { public: static void initialize() { NS::A::initialize() ; } } ; int main() { Initializer::initialize() ; return 0 ; } Frantz -- Summary: friend class using plain scope resolution operator Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal 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=24654