tkem / fsmlite

Lightweight finite state machine framework for C++11
MIT License
161 stars 25 forks source link

How to use std::shared_ptr as a trigger event in the state transition table #25

Closed yabbasi31415 closed 4 years ago

yabbasi31415 commented 4 years ago

In the examples given in fsmlite/tests/, replacing the event data type with an event-type std::shared_ptr gives the following error

fsm.h:140:106: error: call of overloaded ‘forward<const std::shared_ptr<event>&>(const std::shared_ptr<event>&)’ is ambiguous return binary_fn_helper<F, Arg1, Arg2>::invoke(forward<F>(f), forward<Arg1>(a), forward<Arg2>(b));

tkem commented 4 years ago

@yabbasi31415: What platform/compiler are you using?

yabbasi31415 commented 4 years ago

@tkem I'm using g++ compiler (version 7.5.0) on Linux

tkem commented 4 years ago

@yabbasi31415 Thanks for reporting! This should be fixed in https://github.com/tkem/fsmlite/tree/fix/25

tkem commented 4 years ago

Fixed in v0.7.3.