On 7/28/2011 3:50 AM, Nathan Ridge wrote:
f = bind(&S::bar, s1, _1)
Thanks. I understand what _1 does. I thought that leaving off the real arguments and
giving only the object would produce a function object taking those same arguments. I
guess the compiler can't hand that automatically?
Now I get
V:\boost_1_47\boost/bind/bind.hpp(69) : error C2825: 'F': must be a class or namespace
when followed by '::'
V:\boost_1_47\boost/bind/bind_template.hpp(15) : see reference to class template
instantiation 'boost::_bi::result_traits' being compiled
with
[
R=boost::_bi::unspecified,
F=void (__thiscall S::*
)(uint32_t,call_state_machine::State_t,call_state_machine::State_t)
]
.\StateMachine\Call\Windows\StateProcess.cpp(54) : see reference to class
template instantiation 'boost::_bi::bind_t' being compiled
with
[
R=boost::_bi::unspecified,
F=void (__thiscall S::*
)(uint32_t,call_state_machine::State_t,call_state_machine::State_t),
L=boost::_bi::list2,boost::arg<1>>
]
V:\boost_1_47\boost/bind/bind.hpp(69) : error C2039: 'result_type' : is not a member of
'`global namespace''
V:\boost_1_47\boost/bind/bind.hpp(69) : error C2146: syntax error : missing ';' before
identifier 'type'
V:\boost_1_47\boost/bind/bind.hpp(69) : error C2208: 'boost::_bi::type' : no members
defined using this type
F in the first complaint is the pointer-to-function type, so I agree that F::result_type
doesn't make sense.