title: Is there something similar to std::function before C++11?
body: <p>What construct should be used as surrogate for <code>std::function&lt;&gt;</code> when C++11 is not available ?<br>
  The alternative should basically allow to access private member functions of one class from another class like in the example below (other features of std::function are not used). Class Foo is fixed and can not be changed much, I have only access to class Bar.</p>
  
  <pre><code>class Foo {
    friend class Bar; // added by me, rest of the class is fixed
    private:
  
    void doStuffFooA(int i);
    void doStuffFooB(int i);
  };
  
  class Bar {
    public:
  
    Bar( Foo foo, std::function&lt; void (const Foo&amp;, int) &gt; func ) {
      myFoo = foo;
      myFooFunc = func;
    };
  
    private:
  
    doStuffBar( const &amp;Foo foo ) {
      myFooFunc( foo, 3 );
    }
  
    Foo myFoo;
    std::function&lt; void (const Foo&amp;, int) &gt; myFooFunc;
  }
  
  int main() {
  
    Foo foo(...);
  
    Bar barA( foo, &amp;Foo::doStuffFooA );
  
    Bar barB( foo, &amp;Foo::doStuffFooB );
    ...
  }
  </code></pre>