Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51701 - sandbox/msm/boost/msm
From: christophe.j.henry_at_[hidden]
Date: 2009-03-11 10:24:20


Author: chenry
Date: 2009-03-11 10:24:19 EDT (Wed, 11 Mar 2009)
New Revision: 51701
URL: http://svn.boost.org/trac/boost/changeset/51701

Log:
fix compile problems VC8
Text files modified:
   sandbox/msm/boost/msm/dispatch_table.hpp | 16 +++++++++-------
   sandbox/msm/boost/msm/metafunctions.hpp | 2 ++
   sandbox/msm/boost/msm/state_machine.hpp | 14 +++++++++-----
   3 files changed, 20 insertions(+), 12 deletions(-)

Modified: sandbox/msm/boost/msm/dispatch_table.hpp
==============================================================================
--- sandbox/msm/boost/msm/dispatch_table.hpp (original)
+++ sandbox/msm/boost/msm/dispatch_table.hpp 2009-03-11 10:24:19 EDT (Wed, 11 Mar 2009)
@@ -62,18 +62,20 @@
         struct execute_helper
         {
             template <class Sequence>
- static std::pair<int,HandledEnum> execute(
- Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
- typename ::boost::enable_if<typename ::boost::mpl::empty<Sequence>::type,void >::type* dmy=0)
+ static
+ typename ::boost::enable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
+ execute(Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
+ ::boost::msm::dummy<0> = 0)
             {
                 // if at least one guard rejected, this will be ignored, otherwise will generate an error
                 return std::make_pair(state,HANDLED_FALSE);
             }
 
- template <class Sequence>
- static std::pair<int,HandledEnum> execute(
- Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
- typename ::boost::disable_if<typename ::boost::mpl::empty<Sequence>::type,void >::type* dmy=0)
+ template <class Sequence>
+ static
+ typename ::boost::disable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
+ execute(Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
+ ::boost::msm::dummy<1> = 0)
             {
                 // try the first guard
                 typedef typename ::boost::mpl::front<Sequence>::type first_row;

Modified: sandbox/msm/boost/msm/metafunctions.hpp
==============================================================================
--- sandbox/msm/boost/msm/metafunctions.hpp (original)
+++ sandbox/msm/boost/msm/metafunctions.hpp 2009-03-11 10:24:19 EDT (Wed, 11 Mar 2009)
@@ -21,6 +21,8 @@
 #include <boost/mpl/has_xxx.hpp>
 #include <boost/mpl/find_if.hpp>
 #include <boost/mpl/count_if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
 
 #include <boost/type_traits/is_same.hpp>
 

Modified: sandbox/msm/boost/msm/state_machine.hpp
==============================================================================
--- sandbox/msm/boost/msm/state_machine.hpp (original)
+++ sandbox/msm/boost/msm/state_machine.hpp 2009-03-11 10:24:19 EDT (Wed, 11 Mar 2009)
@@ -28,6 +28,8 @@
 #include <boost/mpl/front.hpp>
 #include <boost/mpl/has_xxx.hpp>
 #include <boost/mpl/logical.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
 
 #include <boost/assert.hpp>
 #include <boost/type_traits.hpp>
@@ -238,7 +240,8 @@
     // get a state
     // as a pointer
     template <class State>
- State get_state(typename ::boost::enable_if<typename ::boost::is_pointer<State>::type,void >::type* =0)
+ typename ::boost::enable_if<typename ::boost::is_pointer<State>::type,State >::type
+ get_state(::boost::msm::dummy<0> = 0)
     {
         typedef typename create_stt<Derived>::type stt;
         return &(static_cast<typename boost::add_reference<typename ::boost::remove_pointer<State>::type>::type >
@@ -246,7 +249,8 @@
     }
     // as a reference
     template <class State>
- State get_state(typename ::boost::enable_if<typename ::boost::is_reference<State>::type,void >::type* =0)
+ typename ::boost::enable_if<typename ::boost::is_reference<State>::type,State >::type
+ get_state(::boost::msm::dummy<1> = 0)
     {
         typedef typename create_stt<Derived>::type stt;
         return static_cast<State >
@@ -984,11 +988,11 @@
                 // or state is a normal state and needs nothing except creation
         template <class StateType>
         typename ::boost::enable_if<
- typename ::boost::mpl::and_<typename ::boost::mpl::not_
+ typename boost::mpl::and_<typename boost::mpl::not_
                                                     <typename has_exit_pseudo_states<StateType>::type>::type,
- typename ::boost::mpl::not_
+ typename boost::mpl::not_
                                                     <typename is_pseudo_exit<StateType>::type>::type
- >::type,BaseState*>::type
+ >::type,BaseState*>::type
         new_state_helper( ::boost::msm::dummy<1> = 0) const
         {
             return new StateType;


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