InconsistentHistoryTest1.cpp 965 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //////////////////////////////////////////////////////////////////////////////
  2. // Copyright 2005-2006 Andreas Huber Doenni
  3. // Distributed under the Boost Software License, Version 1.0. (See accompany-
  4. // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //////////////////////////////////////////////////////////////////////////////
  6. #include <boost/statechart/state_machine.hpp>
  7. #include <boost/statechart/simple_state.hpp>
  8. #include <boost/statechart/shallow_history.hpp>
  9. #include <boost/mpl/list.hpp>
  10. namespace sc = boost::statechart;
  11. namespace mpl = boost::mpl;
  12. struct A;
  13. struct InconsistentHistoryTest : sc::state_machine<
  14. InconsistentHistoryTest, A > {};
  15. struct B;
  16. // A does not have history
  17. struct A : sc::simple_state< A, InconsistentHistoryTest,
  18. mpl::list< sc::shallow_history< B > > > {};
  19. struct B : sc::simple_state< B, A > {};
  20. int main()
  21. {
  22. InconsistentHistoryTest machine;
  23. machine.initiate();
  24. return 0;
  25. }