Index: boost/statechart/simple_state.hpp =================================================================== --- boost/statechart/simple_state.hpp (revision 61623) +++ boost/statechart/simple_state.hpp (working copy) @@ -727,7 +727,7 @@ context< termination_state_type >() ); const typename common_context_type::inner_context_ptr_type pCommonContext( - terminationState.context_ptr< common_context_type >() ); + terminationState.template context_ptr< common_context_type >() ); outermost_context_base_type & outermostContextBase( pCommonContext->outermost_context_base() ); @@ -949,7 +949,7 @@ template< class State > static void check_store_deep_history_impl( State & stt ) { - stt.store_deep_history_impl< MostDerived >(); + stt.template store_deep_history_impl< MostDerived >(); } }; friend struct check_store_deep_history_impl_yes; Index: libs/statechart/example/Handcrafted/Handcrafted.cpp =================================================================== --- libs/statechart/example/Handcrafted/Handcrafted.cpp (revision 61623) +++ libs/statechart/example/Handcrafted/Handcrafted.cpp (working copy) @@ -51,6 +51,8 @@ class state : public state_base { public: + state() : state_base() { } + static const Derived & instance() { return instance_; @@ -92,7 +94,10 @@ ////////////////////////////////////////////////////////////////////////////// -class EvFlipBit : public event< EvFlipBit > {}; +class EvFlipBit : public event< EvFlipBit > { +public: + EvFlipBit() : event < EvFlipBit >() { } +}; const EvFlipBit flip; class BitMachine @@ -110,6 +115,8 @@ ////////////////////////////////////////////////////////////////////////// struct On : state< On > { + On() : state() { } + virtual const state_base & react( const EvFlipBit & ) const { return Off::instance(); @@ -118,6 +125,8 @@ struct Off : state< Off > { + Off() : state() { } + virtual const state_base & react( const EvFlipBit & ) const { return On::instance();