
27 Jan
2009
27 Jan
'09
7:21 p.m.
AMDG Archie14 wrote:
typedef boost::function<void (int, int, const char*) > delegateOne; typedef boost::function<void (int, const char*) > delegateTwo;
class A : public boost::noncopyable { public: void commandhandler(delegateOne& f) { // I want to replace first argument in "delegateOne" with value 100. delegateTwo two = boost::bind(&f, 100, _2, _3); } };
I assume that you want to store a reference to f in two? use boost::ref(f) instead of &f. In Christ, Steven Watanabe