[bind] how to get the type after bind

//my question is how to write the type ??? below to make it run .
#include

On 2/1/07, hongleij@126.com
//my question is how to write the type ??? below to make it run .
#include
#include <iostream> using boost::bind; void print() { std::cout <<" print" << std::endl; } template <class T> void func(T t) { std::cout <<"func1(T t) : " ; t(); } int main() { func(bind(&print)); //ok
You don't have to use bind here. func( print ) ; would work. bind ( &func<???>, bind(&print) ) ; //don't know how to write it
}
Note that this expression will not call anything, it will generate a functor
and drop it. I guess what you are trying to do is this
bind( func

On 2/1/07, Server Levent Yilmaz
Note that this expression will not call anything, it will generate a functor and drop it. I guess what you are trying to do is this
bind( func
, print) (); // note the function call operator at the end.
A more conforming statement would be this:
bind( func
participants (2)
-
hongleij@126.com
-
Server Levent Yilmaz