wget https://raw.githubusercontent.com/boost-ext/sml/master/include/boost/sml.hpp
sml
namespace alias#include "boost/sml.hpp"
namespace sml = boost::sml;
$CXX -std=c++14 ... | cl /std:c++14 ...
git clone https://github.com/boost-ext/sml && cd sml && make test
"src_state"_s + event<e> = "dst_state"_s // Error on MSVC-2015, Ok on GCC-5+, Clang-3.4+
state<class src_state> + event<e> = state<class dst_state> // Ok on all supported compilers
const auto guard1 = [] { return true; }
state<class a> + event<e> [ guard1 ] / [](const auto& event) {} // Error on MSVC-2015, Ok on GCC-5+, Clang-3.4+
const auto guard2 = [] -> bool { return true; }
state<class a> + event<e> [ gurad2 ] / [](const auto& event) -> void {} // Ok on all supported compilers
Macro | Description |
---|---|
BOOST_SML_VERSION |
Current version of [Boost].SML (ex. 1'0'0) |
-fno-exceptions
.exception
event. See Error handling.sml::sm<example, sml::thread_safe<std::recursive_mutex>> sm;
sm.process_event(event{}); // thread safe call
Component | Description |
---|---|
[Front-End] | Transition Table Domain Specific Language |
[Back-End] | State Machine implementation details |
Not configurable
Not callable
Not transitional
Not dispatchable