-
April 25th, 2009, 10:58 AM
#1
boost, bind, overloaded functions
We have:
class A
{
public:
void f(int){}
void f(double){}
};
Let's use this way:
A a;
boost::bind( mem_fun_res<void, A, int>(&A::f), &a, 10 );
instead of:
boost::bind( (( void(A::*)(int) )&A::f), &a, 10 );
-
April 25th, 2009, 01:31 PM
#2
Re: boost, bind, overloaded functions
It's hard to know what you need if you don't ask a question. But you may be looking for this: http://www.boost.org/doc/libs/1_38_0...err_overloaded
-
April 26th, 2009, 09:01 AM
#3
Re: boost, bind, overloaded functions
What is the function of bind() ?
Thanks for your help.
-
April 27th, 2009, 08:26 AM
#4
Re: boost, bind, overloaded functions
Originally Posted by Peter_APIIT
What is the function of bind() ?
It's basically a tool for creating function objects. You can reroute the order of parameters, supply some parameters when you create the function object, that type of thing. Look here for more info: http://www.boost.org/doc/libs/1_38_0...bind/bind.html
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|