Boost logo

Boost Users :

From: Wang Yun (a_hao_at_[hidden])
Date: 2005-11-12 10:25:48


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<void()> 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_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
Thank you very much, it works now.

Wang Yun


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net