12 Nov
2005
12 Nov
'05
1:40 p.m.
Wang Yun wrote:
Hi, I tried to bind to a class member function template, but can't pass compile, what's the correct syntax or this is impossible?
class A { public: void test() { function
func; func = boost::bind( &A::ttt<int>, this ); } template<typename T> T ttt() { return 1; } };
This works under VC 8.0, but fails under VC 7.1. Use int (A::*pmf) () = &A::ttt<int>; func = boost::bind( pmf, this );