
26 Jun
2004
26 Jun
'04
7:54 p.m.
"Nico Massi" <desertswat@gmx.de> writes:
Maybe you want
boost::function<int(int,int)> x = boost::bind(f,_1,_2);
??
Better than nothing, but i need a variable number of arguments, if it is possible.
boost::function doesn't support dumping arguments, unless I'm mistaken. Do this: template <class T> struct incomplete; template <class T> int q(T) { incomplete<T> a; } int x = q(boost::bind<int>(f,_1,_2)); The error message will tell you that incomplete<some_nasty_type> is incomplete. Write down that type and use it to declare the result of calling boost::bind. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com