Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63800 - in sandbox/SOC/2010/phoenix3/boost/phoenix/statement: . detail
From: thom.heller_at_[hidden]
Date: 2010-07-09 18:18:20


Author: theller
Date: 2010-07-09 18:18:20 EDT (Fri, 09 Jul 2010)
New Revision: 63800
URL: http://svn.boost.org/trac/boost/changeset/63800

Log:
minor tweaks
Text files modified:
   sandbox/SOC/2010/phoenix3/boost/phoenix/statement/detail/switch.hpp | 2 --
   sandbox/SOC/2010/phoenix3/boost/phoenix/statement/switch.hpp | 33 +++++++++++++++++++++++++--------
   2 files changed, 25 insertions(+), 10 deletions(-)

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/statement/detail/switch.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/statement/detail/switch.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/statement/detail/switch.hpp 2010-07-09 18:18:20 EDT (Fri, 09 Jul 2010)
@@ -22,12 +22,10 @@
         result_type
         operator()(Env& env, Cond const& cond, Case0 const& case0) const
         {
- /*
             switch(eval(cond, env))
             {
                 case A0::value: eval(case0, env); break;
             }
- */
         }
     };
 

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/statement/switch.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/statement/switch.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/statement/switch.hpp 2010-07-09 18:18:20 EDT (Fri, 09 Jul 2010)
@@ -56,17 +56,27 @@
             struct result;
 
             template <typename This, typename Expr, typename State>
- struct result<This(Expr, State)>
- : fusion::result_of::push_front<typename remove_reference<State>::type const, Expr>
+ struct result<This(Expr const&, State&)>
+ : fusion::result_of::push_front<State, Expr>
             {};
 
+ template <typename This, typename Expr, typename State>
+ struct result<This(Expr&, State&)>
+ : fusion::result_of::push_front<State, Expr>
+ {};
+
+ template <typename This, typename Expr, typename State>
+ struct result<This(Expr, State&)>
+ : fusion::result_of::push_front<State, Expr>
+ {};
+
+
             template <typename Expr, typename State>
- typename fusion::result_of::push_front<State const, Expr>::type
- operator()(Expr const& expr, State const& state)
+ typename fusion::result_of::push_front<State, Expr>::type
+ operator()(Expr const& expr, State& state)
             {
                 return fusion::push_front(state, expr);
             }
-
         };
         
         template <typename Case>
@@ -106,11 +116,18 @@
>
               , proto::when<
                     proto::binary_expr<switch_case_tag, proto::_, eval_grammar>
- , detail::push_front(switch_case<proto::_value(proto::_left), proto::_right>(proto::_right), proto::_state)
+ , detail::push_front(
+ switch_case<
+ proto::_value(proto::_left)
+ , proto::_right
+ >(proto::_right)
+ , proto::_state)
>
               , proto::when<
                     proto::unary_expr<switch_default_tag, eval_grammar>
- , detail::push_front(switch_default<proto::_child>(proto::_child), proto::_state)
+ , detail::push_front(
+ switch_default<proto::_child>(proto::_child)
+ , proto::_state)
>
>
         //>
@@ -194,7 +211,7 @@
             typedef
                 typename fusion::result_of::as_vector<
                     typename boost::result_of<
- switch_grammar(Cases const&, fusion::vector0<> const&)
+ switch_grammar(Cases const&, fusion::vector0<>&)
>::type
>::type
                 cases_type;


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