These are some examples that show how to integrate boost::msm and the new boost:sml library in a larger class that has much more responsibilities than just implementing the state machine logic.
This example demonstrates how to use a boost::msm as a class member. To achieve this, an abstract class is used. I recommend Christophe Henry's Meeting C++ talk (https://meetingcpp.com/index.php/talkview13/items/17.html) for further information about boost::msm.
This example demonstrates how to use boost::msm as a class member without the need for an abstract class. This is done by using the Pimpl idiom. As a result the API and the implementation is simplified.
This example is a reimplementation of the first boost::msm example with boost:sml. Again, an abstract class is used.
This example is complementary to the second boost::msm example. It demonstrates how to use boost::sml as a class member without the need for an abstract class.