Oh, that works, thanks! To clarify though, for a member function, bind can be passed either an object pointer, an object reference, a function that returns an object pointer (the result of another bind), or a function that returns an object reference?
Yes, here are some of the cases: #include "boost/lambda/bind.hpp" #include "boost/lambda/lambda.hpp" #include <iostream> using namespace boost; using namespace boost::lambda; class Controller { public: void DoSomething() { std::cout << "Hello World!"; }; }; class View { Controller& contr; public: View(Controller& c) : contr(c) {}; Controller& GetController() { return contr; } Controller* GetControllerPtr() { return &contr; } }; int main () { Controller c; View v(c); View* vp = &v; bind(&Controller::DoSomething, bind(&View::GetController, _1))(v); bind(&Controller::DoSomething, bind(&View::GetController, _1))(vp); bind(&Controller::DoSomething, bind(&View::GetControllerPtr, _1))(vp); }; // ------------------------ Cheers, Jaakko