Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61637 - in trunk: boost/statechart libs/statechart/example/Handcrafted
From: ahd6974-boostorg_at_[hidden]
Date: 2010-04-28 00:26:53


Author: andreas_huber69
Date: 2010-04-28 00:26:51 EDT (Wed, 28 Apr 2010)
New Revision: 61637
URL: http://svn.boost.org/trac/boost/changeset/61637

Log:
Fixes #4156. Thanks for the report!
Text files modified:
   trunk/boost/statechart/simple_state.hpp | 4 ++--
   trunk/libs/statechart/example/Handcrafted/Handcrafted.cpp | 11 ++++++++++-
   2 files changed, 12 insertions(+), 3 deletions(-)

Modified: trunk/boost/statechart/simple_state.hpp
==============================================================================
--- trunk/boost/statechart/simple_state.hpp (original)
+++ trunk/boost/statechart/simple_state.hpp 2010-04-28 00:26:51 EDT (Wed, 28 Apr 2010)
@@ -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;

Modified: trunk/libs/statechart/example/Handcrafted/Handcrafted.cpp
==============================================================================
--- trunk/libs/statechart/example/Handcrafted/Handcrafted.cpp (original)
+++ trunk/libs/statechart/example/Handcrafted/Handcrafted.cpp 2010-04-28 00:26:51 EDT (Wed, 28 Apr 2010)
@@ -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<On>() { }
+
       virtual const state_base & react( const EvFlipBit & ) const
       {
         return Off::instance();
@@ -118,6 +125,8 @@
 
     struct Off : state< Off >
     {
+ Off() : state<Off>() { }
+
       virtual const state_base & react( const EvFlipBit & ) const
       {
         return On::instance();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk