By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

Unbind (or runtime rebind) function

P: n/a
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

Feb 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Feb 21, 7:42 am, psuj...@gmail.com wrote:
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
Although this question is on-topic here, you might get a better
response on Boost's user list.

Cheers! --M

Feb 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.