// Copyright 2010 Christophe Henry // henry UNDERSCORE christophe AT hotmail DOT com // This is an extended version of the state machine available in the boost::mpl library // Distributed under the same license as the original. // Copyright for the original version: // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed // under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MSM_NONSTANDALONE_TEST #define BOOST_TEST_MODULE entries_test #endif #include // back-end #include "BackCommon.hpp" //front-end #include "FrontCommon.hpp" namespace msm = boost::msm; namespace mpl = boost::mpl; namespace { // events struct event1 {}; struct event2 {}; struct event3 {}; struct event4 {}; struct event5 {}; struct event6 { event6(){} template event6(Event const&){} }; // states template struct StateBase : msm::front::test::StateBase { using base = msm::front::test::StateBase; template void on_entry(const Event& event, Fsm& fsm) { static_assert(std::is_same::value, ""); base::on_entry(event, fsm); } template void on_exit(const Event& event, Fsm& fsm) { static_assert(std::is_same::value, ""); base::on_exit(event, fsm); } }; template