Not that this serves any real purpose, but gcc allows me to do some hack
like this:
class hide_A {
public:
class A {
public:
virtual int final() { return 42; }
};
class A_finalize {
public:
virtual void final() {}
};
friend class B;
};
class B : public hide_A::A, private hide_A::A_finalize {
public:
void final() { } //error
};
You can't use A directly and have to access it through B. But you can't
override final() because it will have a conflicting return type no
matter what you do.
Is this valid standard C++? Anyone see any way to circumvent this or any
major problems (other than having no practical value)?
-Rajib