
In my previous post the sample code was a lot more than what what necessary to ask the question. I could have given this simpler example: #include <boost/function.hpp> #include <boost/lambda/lambda.hpp> #include <boost/lambda/bind.hpp> using namespace boost; using namespace boost::lambda; int f(void) { return 5; } int main(void) { int test = 0; (_1 = bind(&f))(test); // No compile error function<int (void)> functorized_f(&f); (_1 = functorized_f)(test); // Compile error return 0; } This is what my question really boils down to: just like naming delayed variables, is it possible to predefine and name the result of a call to bind() outside a lambda expression? /*what goes here?*/ bound_f = bind(&f); (_1 = bound_f)(test);