14 May
2008
14 May
'08
6:40 p.m.
AMDG gfsdjkgf@Safe-mail.net wrote:
Hello, let's come straight to the code. I am not sure why it fails (both boost::bind and boost::lambda::bind fail). I use Visual Studio 9 (2008, x86) and boost 1.35 (retail). What's wrong?
#include
using boost::bind; //#include
//using boost::lambda; template<class Handler_t>void Test2(Handler_t Handler) { }
template<class Handler_t>void Test1(Handler_t Handler) { bind(&Test2
, Handler)();
Wrap Handler in boost::protect. For lambda use boost::lambda::protect
bind(&Test2
}
void TestFunc(int i) { }
int main() { Test1(bind(TestFunc,0)); }
In Christ, Steven Watanabe