Guest User

Untitled

a guest
Oct 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. typedef std::function<void(std::shared_ptr<TimerExpiryInd>)> DefTimerExpiryHandler;
  2.  
  3. std::map< int, DefTimerExpiryHandler > m_timerFSMMap;
  4.  
  5. template<class FSM>
  6. uint32_t startTimer( uint32_t expiryMs, int timerId, FSM& sm )
  7. {
  8. m_timerFSMMap[timerId] = std::bind(&FSM::process_event, &sm,
  9. std::placeholders::_1);
  10. }
  11.  
  12. struct handleRsp
  13. {
  14. template <class FSM, class SourceState, class TargetState>
  15. void operator()(std::shared_ptr<RspWrapper> const& evt, FSM& fsm,
  16. SourceState& srcState, TargetState& dstState)
  17. {
  18. int timerPeriod = 1000 ;
  19. #define TIMER 1
  20. startTimer <FSM> ( timerPeriod, TIMER, fsm );
  21. }
  22. };
  23.  
  24. error: no matching function for call to 'bind'
  25. m_timerFSMMap[timerId] = std::bind(&FSM::process_event, this, std::placehold
  26. ers::_1);
  27.  
  28. c:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC1
  29. 4.12.25827includefunctional(1092,37): note: candidate template ignored: could
  30. n't infer template argument '_Fx'
  31. _Binder<_Unforced, _Fx, _Types...> bind(_Fx&& _Func, _Types&&... _Args)
  32. ^
  33. c:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC1
  34. 4.12.25827includefunctional(1101,32): note: candidate template ignored: could
  35. n't infer template argument '_Ret'
  36. _Binder<_Ret, _Fx, _Types...> bind(_Fx&& _Func, _Types&&... _Args)
  37.  
  38. ^
Add Comment
Please, Sign In to add comment