#include <iostream>
using namespace std;

class Base {
protected:
   static void call_foo(Base* base) { base->foo(); }
private:
   virtual void foo() = 0;
};

class Derived : public Base {
private:
    Base *b;
protected:
    virtual void foo() { /* Some implementation */ };
    virtual void foo2() {
    	// b->foo(); // doesn't work
        call_foo(b); // works
    }
};

int main() {
	// your code goes here
	return 0;
}