Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-06-05 01:39:19


Author: eric_niebler
Date: 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
New Revision: 46154
URL: http://svn.boost.org/trac/boost/changeset/46154

Log:
more compile time tweaks
Text files modified:
   branches/proto/v4/boost/phoenix/bind/bind.hpp | 9 ++
   branches/proto/v4/boost/phoenix/core/actor.hpp | 141 ++++++++++++++++++++++++++++++++++-----
   branches/proto/v4/boost/phoenix/core/argument.hpp | 4
   branches/proto/v4/boost/phoenix/object/construct.hpp | 3
   branches/proto/v4/boost/phoenix/object/new.hpp | 3
   branches/proto/v4/boost/phoenix/operator/member.hpp | 7 +
   branches/proto/v4/boost/phoenix/scope/lambda.hpp | 6 +
   branches/proto/v4/boost/phoenix/scope/let.hpp | 6 +
   branches/proto/v4/boost/phoenix/statement/switch.hpp | 11 ++
   branches/proto/v4/boost/phoenix/statement/try_catch.hpp | 1
   10 files changed, 164 insertions(+), 27 deletions(-)

Modified: branches/proto/v4/boost/phoenix/bind/bind.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/bind/bind.hpp (original)
+++ branches/proto/v4/boost/phoenix/bind/bind.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,7 +9,14 @@
     #ifndef BOOST_PHOENIX_BIND_BIND_HPP_EAN_2008_05_21
     #define BOOST_PHOENIX_BIND_BIND_HPP_EAN_2008_05_21
 
- #include <boost/preprocessor.hpp>
+ #include <boost/preprocessor/arithmetic/sub.hpp>
+ #include <boost/preprocessor/arithmetic/dec.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/facilities/intercept.hpp>
+ #include <boost/preprocessor/punctuation/comma_if.hpp>
+ #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+ #include <boost/preprocessor/repetition/enum_shifted_binary_params.hpp>
     #include <boost/mpl/if.hpp>
     #include <boost/mpl/and.hpp>
     #include <boost/mpl/not.hpp>

Modified: branches/proto/v4/boost/phoenix/core/actor.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/core/actor.hpp (original)
+++ branches/proto/v4/boost/phoenix/core/actor.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -25,13 +25,32 @@
     #include <boost/type_traits/is_base_of.hpp>
     #include <boost/type_traits/add_reference.hpp>
     #include <boost/type_traits/remove_const.hpp>
- #include <boost/preprocessor.hpp>
+ #include <boost/preprocessor/cat.hpp>
+ #include <boost/preprocessor/arithmetic/inc.hpp>
+ #include <boost/preprocessor/arithmetic/sub.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/repeat.hpp>
+ #include <boost/preprocessor/repetition/repeat_from_to.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+ #include <boost/preprocessor/punctuation/comma_if.hpp>
+ #include <boost/preprocessor/seq/size.hpp>
+ #include <boost/preprocessor/seq/for_each_i.hpp>
+ #include <boost/preprocessor/seq/for_each_product.hpp>
     #include <boost/utility/result_of.hpp>
     #include <boost/fusion/include/vector.hpp>
     #include <boost/phoenix/core/as_actor.hpp>
 
     namespace boost { namespace phoenix
     {
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename Value, typename SubGrammar>
+ struct terminal_extension;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<typename Value, typename SubGrammar>
+ struct is_terminal_nullary;
+
         namespace detail
         {
             ////////////////////////////////////////////////////////////////////////////////////////
@@ -65,6 +84,66 @@
                     }
                 };
             };
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+ template<typename SubGrammar, typename Callable = proto::callable>
+ struct is_terminal_nullary_impl
+ : proto::transform<is_terminal_nullary_impl<SubGrammar> >
+ {
+ template<typename Expr, typename, typename>
+ struct impl
+ {
+ typedef
+ typename remove_reference<Expr>::type
+ expr;
+
+ typedef
+ typename expr::proto_child0
+ value_type;
+
+ typedef
+ typename is_terminal_nullary<value_type, SubGrammar>::type
+ result_type;
+ };
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+ template<typename SubGrammar, typename Callable = proto::callable>
+ struct is_valid_terminal_impl
+ : proto::transform<is_valid_terminal_impl<SubGrammar> >
+ {
+ template<typename Expr, typename, typename>
+ struct impl
+ {
+ typedef
+ typename remove_reference<Expr>::type
+ expr;
+
+ typedef
+ typename expr::proto_child0
+ value_type;
+
+ typedef
+ typename proto::matches<Expr, terminal_extension<value_type, SubGrammar> >::type
+ result_type;
+ };
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+ template<typename SubGrammar, typename Callable = proto::callable>
+ struct terminal_extension_impl
+ : proto::transform<is_terminal_nullary_impl<SubGrammar> >
+ {
+ typedef proto::if_<is_valid_terminal_impl<SubGrammar> > proto_base_expr;
+
+ template<typename Expr, typename State, typename Visitor>
+ struct impl
+ : terminal_extension<
+ typename remove_reference<Expr>::type::proto_child0
+ , SubGrammar
+ >::template impl<Expr, State, Visitor>
+ {};
+ };
         }
 
         using detail::evaluator;
@@ -79,12 +158,32 @@
           : proto::otherwise<detail::terminal_evaluator>
         {};
 
+ template<typename Value, typename SubGrammar>
+ struct terminal_extension<Value const, SubGrammar>
+ : terminal_extension<Value, SubGrammar>
+ {};
+
+ template<typename Value, typename SubGrammar>
+ struct terminal_extension<Value &, SubGrammar>
+ : terminal_extension<Value, SubGrammar>
+ {};
+
         ////////////////////////////////////////////////////////////////////////////////////////////
         template<typename Value, typename SubGrammar>
         struct is_terminal_nullary
           : mpl::true_
         {};
 
+ template<typename Value, typename SubGrammar>
+ struct is_terminal_nullary<Value const, SubGrammar>
+ : is_terminal_nullary<Value, SubGrammar>
+ {};
+
+ template<typename Value, typename SubGrammar>
+ struct is_terminal_nullary<Value &, SubGrammar>
+ : is_terminal_nullary<Value, SubGrammar>
+ {};
+
         namespace actorns_
         {
             ////////////////////////////////////////////////////////////////////////////////////////
@@ -125,13 +224,13 @@
         template<typename SubGrammar>
         struct is_nullary_cases
         {
- private:
- template<typename T>
- struct is_terminal_nullary_local
- : is_terminal_nullary<T, SubGrammar>
- {};
+ //private:
+ // template<typename Value>
+ // struct is_terminal_nullary_local
+ // : is_terminal_nullary<Value, SubGrammar>
+ // {};
 
- public:
+ //public:
             template<typename Tag, typename X = void>
             struct case_
               : is_nullary_extension<Tag, SubGrammar>
@@ -139,7 +238,8 @@
 
             template<typename X>
             struct case_<proto::tag::terminal, X>
- : proto::if_<is_terminal_nullary_local<proto::_value>()>
+ //: proto::if_<is_terminal_nullary_local<proto::_value>()>
+ : proto::if_<detail::is_terminal_nullary_impl<SubGrammar> >
             {};
         };
 
@@ -149,13 +249,13 @@
             template<typename SubGrammar = detail::no_sub_grammar>
             struct evaluator_cases
             {
- private:
- template<typename Value>
- struct terminal_extension_local
- : terminal_extension<Value, SubGrammar>
- {};
+ //private:
+ // template<typename Value>
+ // struct terminal_extension_local
+ // : terminal_extension<Value, SubGrammar>
+ // {};
 
- public:
+ //public:
                 template<typename Tag, typename X = void>
                 struct case_
                   : phoenix::extension<Tag, SubGrammar>
@@ -163,12 +263,13 @@
 
                 template<typename X>
                 struct case_<proto::tag::terminal, X>
- : proto::when<
- proto::if_<
- proto::matches<proto::_, terminal_extension_local<proto::_value>()>()
- >
- , proto::lazy<terminal_extension_local<proto::_value> >
- >
+ : detail::terminal_extension_impl<SubGrammar>
+ //: proto::when<
+ // proto::if_<
+ // proto::matches<proto::_, terminal_extension_local<proto::_value>()>()
+ // >
+ // , proto::lazy<terminal_extension_local<proto::_value> >
+ // >
                 {};
             };
 

Modified: branches/proto/v4/boost/phoenix/core/argument.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/core/argument.hpp (original)
+++ branches/proto/v4/boost/phoenix/core/argument.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -8,7 +8,9 @@
 #define BOOST_PHOENIX_ARGUMENT_HPP_EAN_2008_05_10
 
 #include <iosfwd>
-#include <boost/preprocessor.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
 #include <boost/config.hpp>
 #include <boost/mpl/int.hpp>
 #include <boost/mpl/next_prior.hpp>

Modified: branches/proto/v4/boost/phoenix/object/construct.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/object/construct.hpp (original)
+++ branches/proto/v4/boost/phoenix/object/construct.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,6 +9,9 @@
     #ifndef BOOST_PHOENIX_OBJECT_CONSTRUCT_HPP_EAN_2008_05_21
     #define BOOST_PHOENIX_OBJECT_CONSTRUCT_HPP_EAN_2008_05_21
 
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_binary_params.hpp>
     #include <boost/proto/proto.hpp>
     #include <boost/phoenix/core/actor.hpp>
 

Modified: branches/proto/v4/boost/phoenix/object/new.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/object/new.hpp (original)
+++ branches/proto/v4/boost/phoenix/object/new.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,6 +9,9 @@
     #ifndef BOOST_PHOENIX_OBJECT_NEW_HPP_EAN_2008_05_21
     #define BOOST_PHOENIX_OBJECT_NEW_HPP_EAN_2008_05_21
 
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_binary_params.hpp>
     #include <boost/proto/proto.hpp>
     #include <boost/phoenix/core/actor.hpp>
 

Modified: branches/proto/v4/boost/phoenix/operator/member.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/operator/member.hpp (original)
+++ branches/proto/v4/boost/phoenix/operator/member.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,8 +9,13 @@
     #ifndef PHOENIX_OPERATOR_MEMBER_HPP_EAN_2008_05_28
     #define PHOENIX_OPERATOR_MEMBER_HPP_EAN_2008_05_28
 
+ #include <boost/preprocessor/cat.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/arithmetic/sub.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing.hpp>
+ #include <boost/preprocessor/repetition/enum_binary_params.hpp>
     #include <boost/ref.hpp>
- #include <boost/preprocessor.hpp>
     #include <boost/type_traits/is_member_function_pointer.hpp>
     #include <boost/phoenix/core/actor.hpp>
     #include <boost/proto/proto.hpp>

Modified: branches/proto/v4/boost/phoenix/scope/lambda.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/lambda.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/lambda.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,7 +9,11 @@
     #ifndef BOOST_PHOENIX_SCOPE_LAMBDA_HPP_EAN_2008_05_29
     #define BOOST_PHOENIX_SCOPE_LAMBDA_HPP_EAN_2008_05_29
 
- #include <boost/preprocessor.hpp>
+ #include <boost/preprocessor/cat.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/enum.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
     #include <boost/fusion/include/map.hpp>
     #include <boost/fusion/include/fold.hpp>
     #include <boost/fusion/include/pair.hpp>

Modified: branches/proto/v4/boost/phoenix/scope/let.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/let.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/let.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -9,7 +9,11 @@
     #ifndef BOOST_PHOENIX_SCOPE_LET_HPP_EAN_2008_05_21
     #define BOOST_PHOENIX_SCOPE_LET_HPP_EAN_2008_05_21
 
- #include <boost/preprocessor.hpp>
+ #include <boost/preprocessor/cat.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/enum.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
     #include <boost/fusion/include/map.hpp>
     #include <boost/fusion/include/fold.hpp>
     #include <boost/fusion/include/pair.hpp>

Modified: branches/proto/v4/boost/phoenix/statement/switch.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/statement/switch.hpp (original)
+++ branches/proto/v4/boost/phoenix/statement/switch.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -8,7 +8,16 @@
     #ifndef BOOST_PHOENIX_SWITCH_HPP_EAN_2008_05_10
     #define BOOST_PHOENIX_SWITCH_HPP_EAN_2008_05_10
 
- #include <boost/preprocessor.hpp>
+ #include <boost/preprocessor/cat.hpp>
+ #include <boost/preprocessor/arithmetic/inc.hpp>
+ #include <boost/preprocessor/arithmetic/sub.hpp>
+ #include <boost/preprocessor/iteration/iterate.hpp>
+ #include <boost/preprocessor/repetition/repeat.hpp>
+ #include <boost/preprocessor/repetition/enum.hpp>
+ #include <boost/preprocessor/repetition/enum_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+ #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
     #include <boost/proto/proto.hpp>
     #include <boost/phoenix/core/actor.hpp>
 

Modified: branches/proto/v4/boost/phoenix/statement/try_catch.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/statement/try_catch.hpp (original)
+++ branches/proto/v4/boost/phoenix/statement/try_catch.hpp 2008-06-05 01:39:18 EDT (Thu, 05 Jun 2008)
@@ -8,7 +8,6 @@
 #ifndef BOOST_PHOENIX_TRY_CATCH_HPP_EAN_2008_05_18
 #define BOOST_PHOENIX_TRY_CATCH_HPP_EAN_2008_05_18
 
-#include <boost/preprocessor.hpp>
 #include <boost/ref.hpp>
 #include <boost/proto/proto.hpp>
 #include <boost/phoenix/core/actor.hpp>


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