#include #include struct my_func { typedef void result_type; void operator() (int& n) const { ++n; } }; void foo(int& n) { my_func f; boost::phoenix::bind(f, boost::phoenix::placeholders::_1)(n); } int main(int, char*[]) { int n = 0; foo(n); return n; }