boos signals error

Started by
0 comments, last by codehunter13 18 years, 2 months ago
hi all, i'm writing a message system and i use boost::signals but i get an error within the boost library. In my msgDispatcher, i have this: typedef typename boost::signal<void () > cSignal; bool hookFunctToMsg(std::string msgId, const cSignal::slot_type& func); In a test class "cTestController1" i have the function: void msgReply() {} In the same class i do: cMsgDispatcher::getSingletonPtr()->hookFunctToMsg("msg1",&cTestController1::msgReply); The call hookFunctToMsg gives the following error in the boost library: error C2664:'voidboost::function0<R,Allocator>::assign_to<Functor> (FunctionPtr,boost::detail::function::function_ptr_tag) : cannot convert parameter 2 from 'boost::detail::function::member_ptr_tag' to 'boost::detail::function::function_ptr_tag' does someone knows a solution to this? thx in advance
Advertisement
It works when i place the function void msgReply() {} outside the class and use
cMsgDispatcher::getSingletonPtr()->hookFunctToMsg("msg1",&msgReply);
But i need to place the msgReply in classes.

This topic is closed to new replies.

Advertisement