Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65687 - trunk/boost/msm/back
From: christophe.j.henry_at_[hidden]
Date: 2010-09-29 16:02:09


Author: chenry
Date: 2010-09-29 16:02:08 EDT (Wed, 29 Sep 2010)
New Revision: 65687
URL: http://svn.boost.org/trac/boost/changeset/65687

Log:
workaround for IBM compiler and apple gcc
Text files modified:
   trunk/boost/msm/back/state_machine.hpp | 18 ++++++++++++------
   1 files changed, 12 insertions(+), 6 deletions(-)

Modified: trunk/boost/msm/back/state_machine.hpp
==============================================================================
--- trunk/boost/msm/back/state_machine.hpp (original)
+++ trunk/boost/msm/back/state_machine.hpp 2010-09-29 16:02:08 EDT (Wed, 29 Sep 2010)
@@ -1702,12 +1702,20 @@
 #undef MSM_VISITOR_ARGS_EXECUTE
 #undef MSM_VISITOR_ARGS_SUB
 
+// the IBM compiler seems to have problems with nested classes
+// the same seems to apply to the Apple version of gcc 4.0.1 (just in case we do for < 4.1)
+#if defined (__IBMCPP__) || (defined (__APPLE_CC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 1) )
+ public:
+#endif
     template<class ContainingSM>
     void set_containing_sm(ContainingSM* sm)
     {
         m_is_included=true;
         ::boost::fusion::for_each(m_substate_list,add_state<ContainingSM>(this,sm));
     }
+#if defined (__IBMCPP__) || (defined (__APPLE_CC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 1) )
+ private:
+#endif
     // A function object for use with mpl::for_each that stuffs
     // states into the state list.
     template<class ContainingSM>
@@ -2065,7 +2073,7 @@
      }
 
     // the IBM compiler seems to have problems with the friend declaration of dispatch_table
-#ifdef __IBMCPP__
+#if defined (__IBMCPP__)
      public:
 #endif
     // no transition for event.
@@ -2074,9 +2082,6 @@
     {
         return HANDLED_FALSE;
     }
-#ifdef __IBMCPP__
- private:
-#endif
     // called for deferred events. Address set in the dispatch_table at init
     template <class Event>
     static HandledEnum defer_transition(library_sm& fsm, int , int , Event const& e)
@@ -2084,7 +2089,6 @@
         fsm.defer_event(e);
         return HANDLED_DEFERRED;
     }
-
     // called for completion events. Default address set in the dispatch_table at init
     // prevents no-transition detection for completion events
     template <class Event>
@@ -2092,7 +2096,9 @@
     {
         return HANDLED_FALSE;
     }
-
+#if defined (__IBMCPP__)
+ private:
+#endif
     // puts a deferred event in the queue
     void post_deferred_event(deferred_fct& deferred)
     {


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