Original Post
I need to assign a method to a boost::function object expecting a function with a similar signature. The docs show an example using bind. Why am I getting errors? Both C2901 and C4180 are repeated at least 10 times each at various lines in their respective files.
void CubeDemo::on_MoveForward(const Event* e) {/*...*/}
boost::function<void (const Event* e)>mf;
mf=boost::bind(on_MoveForward, this);
c:\dev\include\boost\bind\bind_template.hpp(18) : error C2091: function returns function
c:\Documents and Settings\Dustin\Desktop\katana4\src\cubedemo.cpp(257) : see reference to class template instantiation 'boost::_bi::bind_t<R,F,L>' being compiled
with
[
R=void (const Event *),
F=boost::_mfi::dm<void (const Event *),CubeDemo>,
L=boost::_bi::list1<boost::_bi::list_av_1<CubeDemo *>::B1>
]
c:\dev\include\boost\bind\bind_template.hpp(24) : error C2091: function returns function
c:\dev\include\boost\mem_fn.hpp(255) : warning C4180: qualifier applied to function type has no meaning; ignored
c:\dev\include\boost\bind\bind_template.hpp(160) : see reference to class template instantiation 'boost::_mfi::dm<R,T>' being compiled
with
[
R=void (const Event *),
T=CubeDemo
]