473,385 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Unbind (or runtime rebind) function

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
1 3592
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Avnish Midha | last post by:
Does the Runtime.exec() method support parameters from non-native locales i.e. does it really support the entire unicode range of characters in the parameters. I am trying ot invoke a C++...
11
by: lokb | last post by:
Hi, I have a structure which and defined a smart pointer to the structure. /* Structure of Begin Document Index Record */ typedef struct BDI_Struct{ unsigned char rname; unsigned short int...
5
by: phil_gg04 | last post by:
Dear Javascript Experts, Opera seems to have different ideas about the visibility of Javascript functions than other browsers. For example, if I have this code: if (1==2) { function...
5
by: Gerhard Menzl | last post by:
When creating a Managed C++ DLL using the Visual Studio 7.1 Solution Explorer (by selecting Add New Project and then either choosing Class Library (.NET) or Windows Control Library (.NET)), the IDE...
6
by: pakis | last post by:
I am having a problem of pure virtual function call in my project. Can anyone explaine me the causes of pure virtual function calls other than calling a virtual function in base class? Thanks
4
by: Gromit | last post by:
Hi, Apologies for the cross posting, but I sent this into the web controls board 10 days ago and unluckily for me no-one picked it up. I'd really appreciate any ideas, because I'm quite stuck on...
8
by: Brahm | last post by:
Hey Guys! is there anyway to get in runtime current function or sub name ? Daniel
3
by: ppcguy | last post by:
i've got this for IE: node.onchange = foo; but really i'd like to pass node object to foo function also. in html i would do onchange="foo(this)"...but this has to be done in javascript at...
2
by: sachins5 | last post by:
I have a textbox which is bound to a datasource ... i am trying to unbind it and rebind it down the code ... I was wondering if anyone could give me a clue on how to unbind it .... a worked out...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.