Hi Folks,
I can't quite figure out how to do this correctly (*note* the types ending
in Ptr are typedef'd boost::shared_ptr types)
I have a function like so: -
void setCompleteFunction(boost::function< void (int errorCode, const string
&data, HeaderMapPtr headers) > f);
I try to bind to it: -
wc->setCompleteFunction(boost::bind(&NetworkEventHandler::receiveSkinDownloadResult,
this, _1, _2, _3, wc,myFile, filename.str(), carId, crc, networkPlayerId));
I get quite a few errors indicating that it can't match to this pattern,
this is the most sensible message: -
error C2784:
'boost::_bi::bind_t::type>
boost::bind(boost::type<T>,F,A1,A2,A3,A4,A5,A6,A7,A8,A9)' : could not deduce
template argument for 'boost::type<T>' from 'void (__thiscall
Sirocco::NetworkEventHandler::* )(int,const std::string
&,Sirocco::HeaderMapPtr,Sirocco::IWebConnectionPtr,Sirocco::FilePtr,const
std::string &,const std::string &,const std::string &,const std::string &)'
If i don't put the shared_ptr in there (and remove the _3) it works as
expected, any idea what I could be doing wrong?
Thanks for your help
All the best,
Ash
--
View this message in context: http://www.nabble.com/Using-a-shared_ptr-in-a-boost%3A%3Afunction-definition...
Sent from the Boost - Users mailing list archive at Nabble.com.