compiling error from code using boost::bind code in Vs2010
20 Feb
2013
20 Feb
'13
12:27 a.m.
hello, actually i am using boost 1.48 on vs2010 and the following code does not compile on boost #include<boost/bind.hpp> #include<boost/function.hpp> using namespace boost; class A { public: void evaluate(function<VectorClass(VectorClass,double)> f) }; class B { A a; public; VectorClass f(VectorClass,double); void test() { a.evaluate(bind(f,this,_1,_2)); } }; Any help?
19 Feb
19 Feb
9:42 p.m.
New subject: compiling error from code using boost::bind code in Vs2010
On 20 February 2013 00:27, Miguel Carvajal <macarvajal@estudiantes.fisica.uh.cu> wrote:
class B {
A a; public;
VectorClass f(VectorClass,double);
void test() { a.evaluate(bind(f,this,_1,_2)); } };
I think you need to use '&B::f' rather than 'f' to get a member function pointer to 'f'.
4231
Age (days ago)
4230
Last active (days ago)
1 comments
2 participants
participants (2)
-
Daniel James
-
Miguel Carvajal