amaçlanmaktadır ++ 2015std :: bind() hatası: aşırı fonksiyonun hangi örneği "boost :: asio :: io_service :: run" belirleyemez Visual C bu derlemeye çalışırken
auto worker = std::bind(&boost::asio::io_service::run, &(this->service));
Ben
Benaşırı yükler olduğunu görmek
cannot determine which instance of overloaded function "boost::asio::io_service::run" is intended
: m alma hataları: ile
error C2783: 'std::_Binder<_Ret,_Fx,_Types...> std::bind(_Fx &&,_Types &&...)': could not deduce template argument for '_Ret'
note: see declaration of 'std::bind'
error C2783: 'std::_Binder<_Ret,_Fx,_Types...> std::bind(_Fx &&,_Types &&...)': could not deduce template argument for '_Fx'
note: see declaration of 'std::bind'
error C2783: 'std::_Binder<std::_Unforced,_Fx,_Types...> std::bind(_Fx &&,_Types &&...)': could not deduce template argument for '_Fx'
note: see declaration of 'std::bind'
Ayrıca, IntelliSense şikayet. Ama hangisini kullanacağımı nasıl belirleyebilirim? boost::bind
kodu ile
gayet derler: İki aşırı yükleme yaparak sahiptir
auto worker = boost::bind(&boost::asio::io_service::run, &(this->service));
Sadece bir lambda kullan ...> _> – ildjarn