Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67910 - in sandbox/SOC/2010/phoenix3/boost/phoenix: core core/detail scope
From: thom.heller_at_[hidden]
Date: 2011-01-10 04:39:50


Author: theller
Date: 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
New Revision: 67910
URL: http://svn.boost.org/trac/boost/changeset/67910

Log:
code cleanup take 3
Text files modified:
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp | 21 +++++++++++----------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/arity.hpp | 16 +++++++---------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp | 14 --------------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp | 14 ++++++++------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp | 6 ++----
   sandbox/SOC/2010/phoenix3/boost/phoenix/scope/local_variable.hpp | 39 ++++++++++++++++-----------------------
   6 files changed, 44 insertions(+), 66 deletions(-)

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -50,10 +50,16 @@
         struct actor;
 
         template <typename Expr>
- struct result_matches
- : mpl::eval_if<
- >
- {};
+ struct nullary_actor_result
+ {
+ typedef
+ typename evaluator::impl<
+ Expr const&
+ , fusion::vector2<fusion::vector0<>&, default_actions>&
+ , int
+ >::result_type
+ type;
+ };
 
         template <typename Expr>
         struct actor<Expr>
@@ -62,12 +68,7 @@
                 // avoid calling result_of::actor when this is false
                 typename mpl::eval_if<
                     typename result_of::is_nullary<Expr>::type
- , boost::result_of<
- evaluator(
- Expr const &
- , fusion::vector2<fusion::vector0<>&, default_actions>&
- )
- >
+ , nullary_actor_result<Expr>
                   , mpl::identity<detail::error_expecting_arguments>
>::type
             type;

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/arity.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/arity.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/arity.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -37,15 +37,13 @@
         template <typename Expr>
         struct arity
             : mpl::int_<
- boost::result_of<
- evaluator(
- Expr const&
- , fusion::vector2<
- mpl::int_<0>
- , boost::phoenix::arity
- >&
- )
- >::type::value
+ evaluator::impl<
+ Expr const&
+ , fusion::vector2<
+ mpl::int_<0>
+ , boost::phoenix::arity
+ >&
+ >::result_type::value
>
         {};
     }

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -40,20 +40,6 @@
>::result_type
                 type;
         };
- /*
- : boost::result_of<
- phoenix::evaluator(
- Expr const&
- , fusion::vector2<
- BOOST_PP_CAT(fusion::vector, PHOENIX_ITERATION)<
- PHOENIX_A
- >
- , default_actions
- >
- )
- >
- {};
- */
 
 #endif
 

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -21,7 +21,6 @@
 
 namespace boost { namespace phoenix
 {
- //: boost::result_of<proto::functional::at(Env, mpl::int_<N>)>
     namespace functional
     {
     #define BOOST_PHOENIX_GET_ENVIRONMENT(NAME, N) \
@@ -76,11 +75,14 @@
 
             template <typename This, typename N, typename Env>
             struct result<This(N, Env &)>
- : boost::result_of<
- proto::functional::at(
- typename args::result<args(Env &)>::type
- , N
- )
+ : fusion::result_of::at<
+ typename boost::remove_reference<
+ typename fusion::result_of::at<
+ Env
+ , mpl::int_<0>
+ >::type
+ >::type
+ , typename proto::detail::uncvref<N>::type
>
             {};
 

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -60,14 +60,12 @@
         template <typename This, typename Actor, typename Env>
         struct result<This(Actor, Env)>
             : boost::remove_reference<
- typename boost::result_of<
- evaluator(Actor, Env)
- >::type
+ typename evaluator::impl<Actor, Env, int>::result_type
>
         {};
 
         template <typename Env>
- typename result<custom_terminal(actor<Expr> &, Env &)>::type
+ typename result<custom_terminal(actor<Expr> const &, Env &)>::type
         operator()(actor<Expr> const & expr, Env & env) const
         {
             return eval(expr, env);

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/scope/local_variable.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/scope/local_variable.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/scope/local_variable.hpp 2011-01-10 04:39:47 EST (Mon, 10 Jan 2011)
@@ -68,9 +68,7 @@
             struct result<This(Expr&, Env &)>
             {
                 typedef
- typename boost::result_of<
- evaluator(Expr const &, Env &)
- >::type
+ typename evaluator::impl<Expr const &, Env &, int>::result_type
                     result_type;
                 typedef
                     typename mpl::eval_if<
@@ -284,31 +282,25 @@
                     typename Args::locals_type
                   , mpl::void_
>
- , boost::result_of<
- This(typename Args::outer_env_type&)
- >
+ , typename This:: template result<This(typename Args::outer_env_type&)>
               , mpl::eval_if<
                     is_same<
                         typename proto::detail::uncvref<
- typename boost::result_of<
- detail::find_local(
- typename Args::locals_type &
- , Env
- , Key
- )
- >::type
+ typename detail::find_local::impl<
+ typename Args::locals_type &
+ , Env
+ , Key
+ >::result_type
>::type
                       , detail::local_var_not_found
>
- , boost::result_of<
- This(typename Args::outer_env_type&)
- >
- , boost::result_of<
- detail::find_local(
+ , typename This:: template result<This(typename Args::outer_env_type&)>
+ , mpl::identity<
+ typename detail::find_local::impl<
                             typename Args::locals_type &
                           , Env
                           , Key
- )
+ >::result_type
>
>
>
@@ -332,7 +324,7 @@
         {
             typedef
                 typename proto::detail::uncvref<
- typename boost::result_of<
+ typename functional::args::result<
                         functional::args(Env)
>::type
>::type
@@ -353,7 +345,7 @@
         {
             typedef
                 typename proto::detail::uncvref<
- typename boost::result_of<
+ typename functional::args::result<
                         functional::args(Env)
>::type
>::type
@@ -373,7 +365,7 @@
             {
                 typedef
                     typename proto::detail::uncvref<
- typename boost::result_of<
+ typename functional::args::result<
                             functional::args(Env)
>::type
>::type
@@ -442,8 +434,9 @@
                 typename expression::local_variable<Local>::type
                 lookup_grammar;
 
+ typedef get_local<lookup_grammar> get_local_type;
             typedef
- typename boost::result_of<get_local<lookup_grammar>(Env)>::type
+ typename get_local_type::template result<get_local_type(Env)>::type
                 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