[bind]How to bind to a template class member function?
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
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 );
Peter Dimov wrote:
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 );
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thank you very much, it works now. Wang Yun
participants (2)
-
Peter Dimov
-
Wang Yun