Boost C++ Libraries

PrevUpHomeNext
Introduction
Overview
Features/Benchmarks
Tutorial/Workshop
UML vs SML
User Guide
Examples
FAQ
CHANGELOG

Quick Start

wget https://raw.githubusercontent.com/boost-ext/sml/master/include/boost/sml.hpp
#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

Dependencies

Supported/Tested compilers

  "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

Configuration

Macro Description
BOOST_SML_VERSION Current version of [Boost].SML (ex. 1'0'0)

Exception Safety

Thread Safety

sml::sm<example, sml::thread_safe<std::recursive_mutex>> sm;
sm.process_event(event{}); // thread safe call

Design

Design

Component Description
[Front-End] Transition Table Domain Specific Language
[Back-End] State Machine implementation details

Error messages

Not configurable CPP

Not callable CPP

Not transitional CPP

Not dispatchable CPP


PrevUpHomeNext