P
psujkov
Hi everybody,
Is it possible in any way to unbind function, binded before with
boost::bind ?
void f(int a, int b)
{
return a + b;
}
boost::function<void (void)> packed = boost::bind(&f, 3, 4);
e.g. (pseudocode) :
a) boost::function<void (int)> unpacked = unbind<void
(int)>(packed); // e.g. parameters from right to left - b is unbinded
b) boost::function<void (void)> repacked = rebind(packed, 5, 6);
I'm using boost::function<> as a holder for a boost::bind result, but
I think it lacks functionality to do such a think, maybe anyone knows
other bind-holders ? Or any possibility to use boost::function for
this task ? Any ideas ?..
best regards, Paul Sujkov
Is it possible in any way to unbind function, binded before with
boost::bind ?
void f(int a, int b)
{
return a + b;
}
boost::function<void (void)> packed = boost::bind(&f, 3, 4);
e.g. (pseudocode) :
a) boost::function<void (int)> unpacked = unbind<void
(int)>(packed); // e.g. parameters from right to left - b is unbinded
b) boost::function<void (void)> repacked = rebind(packed, 5, 6);
I'm using boost::function<> as a holder for a boost::bind result, but
I think it lacks functionality to do such a think, maybe anyone knows
other bind-holders ? Or any possibility to use boost::function for
this task ? Any ideas ?..
best regards, Paul Sujkov