19 Aug
2006
19 Aug
'06
10:27 a.m.
Matt Schuckmann
I can't seem to make boost::bind work with a member template function and it seems like is should.
The following won't compile with MSVC 7.0,
Hi, It's a bug in MSVC. You can try this workaround: void ( Test_t::*f )( int, std::vector<long> & ) = &Test_t::testV<long>; boost::bind( f, t, _1, v )(i); Another options is to deduce type automatically: struct Appender { typedef void result_type; template <class T> void operator()( Test_t & t, int i, std::vector<T>& b ) const { t.testV( i, b ); } }; boost::bind( Appender(), t, _1, v )(i); Roman Perepelitsa.