Ticket #4156: boost-statechart-fixes.patch
File boost-statechart-fixes.patch, 2.1 KB (added by , 12 years ago) |
---|
-
boost/statechart/simple_state.hpp
727 727 context< termination_state_type >() ); 728 728 const typename 729 729 common_context_type::inner_context_ptr_type pCommonContext( 730 terminationState. context_ptr< common_context_type >() );730 terminationState.template context_ptr< common_context_type >() ); 731 731 outermost_context_base_type & outermostContextBase( 732 732 pCommonContext->outermost_context_base() ); 733 733 … … 949 949 template< class State > 950 950 static void check_store_deep_history_impl( State & stt ) 951 951 { 952 stt. store_deep_history_impl< MostDerived >();952 stt.template store_deep_history_impl< MostDerived >(); 953 953 } 954 954 }; 955 955 friend struct check_store_deep_history_impl_yes; -
libs/statechart/example/Handcrafted/Handcrafted.cpp
51 51 class state : public state_base 52 52 { 53 53 public: 54 state() : state_base() { } 55 54 56 static const Derived & instance() 55 57 { 56 58 return instance_; … … 92 94 93 95 94 96 ////////////////////////////////////////////////////////////////////////////// 95 class EvFlipBit : public event< EvFlipBit > {}; 97 class EvFlipBit : public event< EvFlipBit > { 98 public: 99 EvFlipBit() : event < EvFlipBit >() { } 100 }; 96 101 const EvFlipBit flip; 97 102 98 103 class BitMachine … … 110 115 ////////////////////////////////////////////////////////////////////////// 111 116 struct On : state< On > 112 117 { 118 On() : state<On>() { } 119 113 120 virtual const state_base & react( const EvFlipBit & ) const 114 121 { 115 122 return Off::instance(); … … 118 125 119 126 struct Off : state< Off > 120 127 { 128 Off() : state<Off>() { } 129 121 130 virtual const state_base & react( const EvFlipBit & ) const 122 131 { 123 132 return On::instance();