$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: eric_at_[hidden]
Date: 2007-12-15 01:15:33
Author: eric_niebler
Date: 2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
New Revision: 42066
URL: http://svn.boost.org/trac/boost/changeset/42066
Log:
misc clean-up
Text files modified: 
   branches/proto/v3/boost/xpressive/proto/debug.hpp          |     4                                         
   branches/proto/v3/boost/xpressive/proto/extends.hpp        |   200 ++++++++++++++++++++++++++------------- 
   branches/proto/v3/boost/xpressive/proto/operators.hpp      |    78 +++++++-------                          
   branches/proto/v3/boost/xpressive/proto/traits.hpp         |    14 +-                                      
   branches/proto/v3/boost/xpressive/proto/transform/call.hpp |     4                                         
   5 files changed, 181 insertions(+), 119 deletions(-)
Modified: branches/proto/v3/boost/xpressive/proto/debug.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/debug.hpp	(original)
+++ branches/proto/v3/boost/xpressive/proto/debug.hpp	2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
@@ -154,8 +154,8 @@
             static void call_(display_expr &, argsns_::cons<> const &)
             {}
 
-            template<typename... Args>
-            static void call_(display_expr &display, argsns_::cons<Args...> const &args)
+            template<typename Cons>
+            static void call_(display_expr &display, Cons const &args)
             {
                 display(args.car);
                 call_(display, args.cdr);
Modified: branches/proto/v3/boost/xpressive/proto/extends.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/extends.hpp	(original)
+++ branches/proto/v3/boost/xpressive/proto/extends.hpp	2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
@@ -27,105 +27,167 @@
     ///
     #define BOOST_PROTO_CONST1 const
 
-    #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain)\
-        Expr expr;\
-        \
-        typedef Expr proto_base_expr;\
-        typedef Domain proto_domain;\
-        typedef Derived proto_derived_expr;\
-        typedef typename Expr::proto_tag proto_tag;\
-        typedef typename Expr::proto_args proto_args;\
-        static long const proto_arity = Expr::proto_arity;\
-        typedef void proto_is_expr_;\
-        typedef boost::proto::tag::proto_expr fusion_tag;\
-        \
-        static Derived make(Expr const &expr)\
-        {\
-            Derived that = {expr};\
-            return that;\
-        }\
-        \
-        Expr &proto_base()\
-        {\
-            return this->expr;\
-        }\
-        \
-        Expr const &proto_base() const\
-        {\
-            return this->expr;\
-        }\
+    #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain)                                              \
+        Expr expr;                                                                                  \
+                                                                                                    \
+        typedef Expr proto_base_expr;                                                               \
+        typedef Domain proto_domain;                                                                \
+        typedef Derived proto_derived_expr;                                                         \
+        typedef typename Expr::proto_tag proto_tag;                                                 \
+        typedef typename Expr::proto_args proto_args;                                               \
+        static long const proto_arity = Expr::proto_arity;                                          \
+        typedef void proto_is_expr_;                                                                \
+        typedef boost::proto::tag::proto_expr fusion_tag;                                           \
+                                                                                                    \
+        static Derived make(Expr const &expr)                                                       \
+        {                                                                                           \
+            Derived that = {expr};                                                                  \
+            return that;                                                                            \
+        }                                                                                           \
+                                                                                                    \
+        Expr &proto_base()                                                                          \
+        {                                                                                           \
+            return this->expr;                                                                      \
+        }                                                                                           \
+                                                                                                    \
+        Expr const &proto_base() const                                                              \
+        {                                                                                           \
+            return this->expr;                                                                      \
+        }                                                                                           \
         /**/
 
         /// INTERNAL ONLY
         ///
-    #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const)\
-        template<typename A>\
-        typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::assign, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type> > >::type\
-        operator =(A &&a) BOOST_PROTO_CONST ## Const\
-        {\
-            typedef boost::proto::expr<boost::proto::tag::assign, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type> > that_type;\
-            that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this), {boost::proto::result_of::as_arg<A, Domain>::call(a)}}};\
-            return Domain::make(that);\
-        }\
+    #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const)                          \
+        template<typename A>                                                                        \
+        typename boost::mpl::apply_wrap1<                                                           \
+            Domain                                                                                  \
+          , boost::proto::expr<                                                                     \
+                boost::proto::tag::assign                                                           \
+              , boost::proto::args<                                                                 \
+                    Derived BOOST_PROTO_CONST ## Const &                                            \
+                  , typename boost::proto::result_of::as_arg<A, Domain>::type                       \
+                >                                                                                   \
+            >                                                                                       \
+        >::type                                                                                     \
+        operator =(A &&a) BOOST_PROTO_CONST ## Const                                                \
+        {                                                                                           \
+            typedef                                                                                 \
+                boost::proto::expr<                                                                 \
+                    boost::proto::tag::assign                                                       \
+                  , boost::proto::args<                                                             \
+                        Derived BOOST_PROTO_CONST ## Const &                                        \
+                      , typename boost::proto::result_of::as_arg<A, Domain>::type                   \
+                    >                                                                               \
+                >                                                                                   \
+            that_type;                                                                              \
+            that_type that = {                                                                      \
+                {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)                           \
+              , {boost::proto::result_of::as_arg<A, Domain>::call(a)}}                              \
+            };                                                                                      \
+            return Domain::make(that);                                                              \
+        }                                                                                           \
         /**/
 
-    #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)                                 \
         BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 1)
 
-    #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)                             \
         BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 0)
 
-    #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain)                                       \
+        BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)                                     \
+        BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)                                 \
         /**/
 
         /// INTERNAL ONLY
         ///
-    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const)\
-        template<typename A>\
-        typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::subscript, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type> > >::type\
-        operator [](A &&a) BOOST_PROTO_CONST ## Const\
-        {\
-            typedef boost::proto::expr<boost::proto::tag::subscript, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type> > that_type;\
-            that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this), {boost::proto::result_of::as_arg<A, Domain>::call(a)}}};\
-            return Domain::make(that);\
-        }\
+    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const)                       \
+        template<typename A>                                                                        \
+        typename boost::mpl::apply_wrap1<                                                           \
+            Domain                                                                                  \
+          , boost::proto::expr<                                                                     \
+                boost::proto::tag::subscript                                                        \
+              , boost::proto::args<                                                                 \
+                    Derived BOOST_PROTO_CONST ## Const &                                            \
+                  , typename boost::proto::result_of::as_arg<A, Domain>::type                       \
+              >                                                                                     \
+            >                                                                                       \
+        >::type                                                                                     \
+        operator [](A &&a) BOOST_PROTO_CONST ## Const                                               \
+        {                                                                                           \
+            typedef                                                                                 \
+                boost::proto::expr<                                                                 \
+                    boost::proto::tag::subscript                                                    \
+                  , boost::proto::args<                                                             \
+                        Derived BOOST_PROTO_CONST ## Const &                                        \
+                      , typename boost::proto::result_of::as_arg<A, Domain>::type                   \
+                    >                                                                               \
+                >                                                                                   \
+            that_type;                                                                              \
+            that_type that = {                                                                      \
+                {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)                           \
+              , {boost::proto::result_of::as_arg<A, Domain>::call(a)}}                              \
+            };                                                                                      \
+            return Domain::make(that);                                                              \
+        }                                                                                           \
         /**/
 
-    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)                              \
         BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 1)
 
-    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)                          \
         BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 0)
 
-    #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain)                                    \
+        BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)                                  \
+        BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)                              \
         /**/
 
         /// INTERNAL ONLY
         ///
-    #define BOOST_PROTO_EXTENDS_FUNCTION_IMPL_(Expr, Derived, Domain, Const)\
-        template<typename... A>\
-        typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::function, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type...> > >::type\
-        operator ()(A &&... a) BOOST_PROTO_CONST ## Const\
-        {\
-            typedef boost::proto::expr<boost::proto::tag::function, boost::proto::args<Derived BOOST_PROTO_CONST ## Const &, typename boost::proto::result_of::as_arg<A, Domain>::type...> > that_type;\
-            that_type that = {boost::proto::argsns_::make_cons(*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this), boost::proto::result_of::as_arg<A, Domain>::call(a)...)};\
-            return Domain::make(that);\
-        }\
+    #define BOOST_PROTO_EXTENDS_FUNCTION_IMPL_(Expr, Derived, Domain, Const)                        \
+        template<typename... A>                                                                     \
+        typename boost::mpl::apply_wrap1<                                                           \
+            Domain                                                                                  \
+          , boost::proto::expr<                                                                     \
+                boost::proto::tag::function                                                         \
+              , boost::proto::args<                                                                 \
+                    Derived BOOST_PROTO_CONST ## Const &                                            \
+                  , typename boost::proto::result_of::as_arg<A, Domain>::type...                    \
+                >                                                                                   \
+            >                                                                                       \
+        >::type                                                                                     \
+        operator ()(A &&... a) BOOST_PROTO_CONST ## Const                                           \
+        {                                                                                           \
+            typedef                                                                                 \
+                boost::proto::expr<                                                                 \
+                    boost::proto::tag::function                                                     \
+                  , boost::proto::args<                                                             \
+                        Derived BOOST_PROTO_CONST ## Const &                                        \
+                      , typename boost::proto::result_of::as_arg<A, Domain>::type...                \
+                    >                                                                               \
+                >                                                                                   \
+            that_type;                                                                              \
+            that_type that = {                                                                      \
+                boost::proto::argsns_::make_cons(                                                   \
+                    *static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)                        \
+                  , boost::proto::result_of::as_arg<A, Domain>::call(a)...                          \
+                )                                                                                   \
+            };                                                                                      \
+            return Domain::make(that);                                                              \
+        }                                                                                           \
         /**/
 
-    #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)                               \
         BOOST_PROTO_EXTENDS_FUNCTION_IMPL_(Expr, Derived, Domain, 1)
 
-    #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)                           \
         BOOST_PROTO_EXTENDS_FUNCTION_IMPL_(Expr, Derived, Domain, 0)
 
-    #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)\
-        BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)\
+    #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain)                                     \
+        BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)                                   \
+        BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)                               \
         /**/
 
     namespace exprns_
Modified: branches/proto/v3/boost/xpressive/proto/operators.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/operators.hpp	(original)
+++ branches/proto/v3/boost/xpressive/proto/operators.hpp	2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
@@ -151,47 +151,47 @@
     #define BOOST_PROTO_UNARY_OP_IS_POSTFIX_0
     #define BOOST_PROTO_UNARY_OP_IS_POSTFIX_1 , int
 
-    #define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, POST)                        \
-        template<typename A>                                                        \
-        typename detail::generate_if<                                               \
-            true                                                                    \
-          , UNREF(A)::proto_domain                                                  \
-          , expr<TAG, args<                                                         \
-                typename result_of::as_arg<A, UNREF(A)::proto_domain>::type         \
-            > >                                                                     \
-        >::type                                                                     \
-        operator OP(A &&a BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST)                 \
-        {                                                                           \
-            typedef UNREF(A)::proto_domain D;                                       \
-            expr<TAG, args<                                                         \
-                typename result_of::as_arg<A, D>::type                              \
-            > > that = {{result_of::as_arg<A, D>::call(a)}};                        \
-            return D::make(that);                                                   \
-        }                                                                           \
+    #define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, POST)                                        \
+        template<typename A>                                                                        \
+        typename detail::generate_if<                                                               \
+            true                                                                                    \
+          , UNREF(A)::proto_domain                                                                  \
+          , expr<TAG, args<                                                                         \
+                typename result_of::as_arg<A, UNREF(A)::proto_domain>::type                         \
+            > >                                                                                     \
+        >::type                                                                                     \
+        operator OP(A &&a BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST)                                 \
+        {                                                                                           \
+            typedef UNREF(A)::proto_domain D;                                                       \
+            expr<TAG, args<                                                                         \
+                typename result_of::as_arg<A, D>::type                                              \
+            > > that = {{result_of::as_arg<A, D>::call(a)}};                                        \
+            return D::make(that);                                                                   \
+        }                                                                                           \
         /**/
 
-    #define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG)                             \
-        template<typename A, typename B>                                            \
-        typename detail::generate_if<                                               \
-            result_of::is_expr<A>::value || result_of::is_expr<B>::value            \
-          , typename detail::unify_domain<A, B>::type                               \
-          , expr<TAG, args<                                                         \
-                typename result_of::as_arg<A, typename detail::unify_domain<A, B>::type>::type\
-              , typename result_of::as_arg<B, typename detail::unify_domain<A, B>::type>::type\
-            > >                                                                     \
-        >::type                                                                     \
-        operator OP(A &&a, B &&b)                                                   \
-        {                                                                           \
-            typedef typename detail::unify_domain<A, B>::type D;                    \
-            expr<TAG, args<                                                         \
-                typename result_of::as_arg<A, D>::type                              \
-              , typename result_of::as_arg<B, D>::type                              \
-            > > that = {{                                                           \
-                result_of::as_arg<A, D>::call(a)                                    \
-              , {result_of::as_arg<B, D>::call(b)}                                  \
-            }};                                                                     \
-            return D::make(that);                                                   \
-        }                                                                           \
+    #define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG)                                             \
+        template<typename A, typename B>                                                            \
+        typename detail::generate_if<                                                               \
+            result_of::is_expr<A>::value || result_of::is_expr<B>::value                            \
+          , typename detail::unify_domain<A, B>::type                                               \
+          , expr<TAG, args<                                                                         \
+                typename result_of::as_arg<A, typename detail::unify_domain<A, B>::type>::type      \
+              , typename result_of::as_arg<B, typename detail::unify_domain<A, B>::type>::type      \
+            > >                                                                                     \
+        >::type                                                                                     \
+        operator OP(A &&a, B &&b)                                                                   \
+        {                                                                                           \
+            typedef typename detail::unify_domain<A, B>::type D;                                    \
+            expr<TAG, args<                                                                         \
+                typename result_of::as_arg<A, D>::type                                              \
+              , typename result_of::as_arg<B, D>::type                                              \
+            > > that = {                                                                            \
+                {result_of::as_arg<A, D>::call(a)                                                   \
+              , {result_of::as_arg<B, D>::call(b)}}                                                 \
+            };                                                                                      \
+            return D::make(that);                                                                   \
+        }                                                                                           \
         /**/
 
         BOOST_PROTO_DEFINE_UNARY_OPERATOR(+, tag::posit, 0)
Modified: branches/proto/v3/boost/xpressive/proto/traits.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/traits.hpp	(original)
+++ branches/proto/v3/boost/xpressive/proto/traits.hpp	2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
@@ -143,9 +143,9 @@
             typename result<unary_expr(Expr const &, State const &, Visitor &)>::type
             operator()(Expr const &expr, State const &state, Visitor &visitor) const
             {
-                typename result<unary_expr(Expr const &, State const &, Visitor &)>::type that = {{
-                    T()(proto::arg_c<0>(expr), state, visitor)
-                }};
+                typename result<unary_expr(Expr const &, State const &, Visitor &)>::type that = {
+                    {T()(proto::arg_c<0>(expr), state, visitor)}
+                };
                 return that;
             }
         };
@@ -172,10 +172,10 @@
             typename result<binary_expr(Expr const &, State const &, Visitor &)>::type
             operator()(Expr const &expr, State const &state, Visitor &visitor) const
             {
-                typename result<binary_expr(Expr const &, State const &, Visitor &)>::type that = {{
-                    T()(proto::arg_c<0>(expr), state, visitor)
-                  , {U()(proto::arg_c<1>(expr), state, visitor)}
-                }};
+                typename result<binary_expr(Expr const &, State const &, Visitor &)>::type that = {
+                    {T()(proto::arg_c<0>(expr), state, visitor)
+                  , {U()(proto::arg_c<1>(expr), state, visitor)}}
+                };
                 return that;
             }
         };
Modified: branches/proto/v3/boost/xpressive/proto/transform/call.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/call.hpp	(original)
+++ branches/proto/v3/boost/xpressive/proto/transform/call.hpp	2007-12-15 01:15:31 EST (Sat, 15 Dec 2007)
@@ -12,6 +12,7 @@
 #include <boost/utility/result_of.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
+#include <boost/xpressive/proto/detail/dont_care.hpp>
 #include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
@@ -27,8 +28,7 @@
                 return const_cast<T &>(t);
             }
 
-            struct dont_care { dont_care(...); };
-
+            using proto::detail::dont_care;
             typedef char (&yes_type)[2];
             typedef char no_type;