Ticket #4156: boost-statechart-fixes.patch

File boost-statechart-fixes.patch, 2.1 KB (added by Douglas Gregor, 12 years ago)

Patch fixing the issues found

  • boost/statechart/simple_state.hpp

     
    727727        context< termination_state_type >() );
    728728      const typename
    729729        common_context_type::inner_context_ptr_type pCommonContext(
    730           terminationState.context_ptr< common_context_type >() );
     730          terminationState.template context_ptr< common_context_type >() );
    731731      outermost_context_base_type & outermostContextBase(
    732732        pCommonContext->outermost_context_base() );
    733733
     
    949949      template< class State >
    950950      static void check_store_deep_history_impl( State & stt )
    951951      {
    952         stt.store_deep_history_impl< MostDerived >();
     952        stt.template store_deep_history_impl< MostDerived >();
    953953      }
    954954    };
    955955    friend struct check_store_deep_history_impl_yes;
  • libs/statechart/example/Handcrafted/Handcrafted.cpp

     
    5151class state : public state_base
    5252{
    5353  public:
     54    state() : state_base() { }
     55
    5456    static const Derived & instance()
    5557    {
    5658      return instance_;
     
    9294
    9395
    9496//////////////////////////////////////////////////////////////////////////////
    95 class EvFlipBit : public event< EvFlipBit > {};
     97class EvFlipBit : public event< EvFlipBit > {
     98public:
     99  EvFlipBit() : event < EvFlipBit >() { }
     100};
    96101const EvFlipBit flip;
    97102
    98103class BitMachine
     
    110115    //////////////////////////////////////////////////////////////////////////
    111116    struct On : state< On >
    112117    {
     118      On() : state<On>() { }
     119
    113120      virtual const state_base & react( const EvFlipBit & ) const
    114121      {
    115122        return Off::instance();
     
    118125
    119126    struct Off : state< Off >
    120127    {
     128      Off() : state<Off>() { }
     129
    121130      virtual const state_base & react( const EvFlipBit & ) const
    122131      {
    123132        return On::instance();