------- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-22 05:40 ------- This is invalid code as the operator++ in B hides both operator++. In the same way, the following code is also invalid: struct A { const A& f(int) { return *this; } virtual const A& f() = 0; };
struct B : public A { virtual const A& f() { return *this; } }; int main(void) { B teste; teste.f(1); return 0; } ---------------- Adding using A::operator++; inside B, makes this valid code and have GCC accept the code. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29545