28 Jan
2005
28 Jan
'05
1:31 a.m.
Duane Murphy wrote:
How do I work around this problem with bind?
#include
namespace {
class functions { public: int func( int ); int func( int, int ); };
void test() { functions a_func;
boost::bind( functions::func, a_func, 1, _1 ); }
}
This looks like it should work (after adding an ampersand in front of functions::func) .... Works of VC7.1 and GCC 3.4.2.
As I recall there was some way of helping bind to pick one of the overloaded functions using a typedef or something similar. (Maybe that was function?).
See this thread. http://lists.boost.org/MailArchives/boost/msg69451.php This message has an example almost the same as yours: http://lists.boost.org/MailArchives/boost/msg69561.php
Thanks for any tips,
...Duane
Jonathan