I have the following scheme:
class Interface
{
virtual ~Interface() { }
virtual void foo() const = 0;
virtual void bar() const = 0;
}
//Interface is derived privately mostly for preventing upcast outside
class Derived : private Interface
{
public:
void foo() const;
private:
void bar() const;
}
It does not compile : foo
is private. Is there any way to make it public without adding a dummy public function?