Update of /cvsroot/boost/boost/boost/xpressive/proto
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32581/proto

Modified Files:
        expr.hpp extends.hpp operators.hpp proto_fwd.hpp 
Log Message:
proto::generate<> is enable_if-friendly

Index: expr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/expr.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- expr.hpp    3 Feb 2007 09:04:30 -0000       1.20
+++ expr.hpp    13 Feb 2007 08:25:32 -0000      1.21
@@ -127,6 +127,14 @@
             }
 
             template<typename A>
+            expr<tag::assign, args2<ref<expr>, typename 
result_of::as_arg<A>::type> > const
+            operator =(A &a) const
+            {
+                expr<tag::assign, args2<ref<expr>, typename 
result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+                return that;
+            }
+
+            template<typename A>
             expr<tag::assign, args2<ref<expr>, typename result_of::as_arg<A 
const>::type> > const
             operator =(A const &a) const
             {
@@ -135,6 +143,14 @@
             }
 
             template<typename A>
+            expr<tag::subscript, args2<ref<expr>, typename 
result_of::as_arg<A>::type> > const
+            operator [](A &a) const
+            {
+                expr<tag::subscript, args2<ref<expr>, typename 
result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+                return that;
+            }
+
+            template<typename A>
             expr<tag::subscript, args2<ref<expr>, typename result_of::as_arg<A 
const>::type> > const
             operator [](A const &a) const
             {

Index: extends.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/extends.hpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- extends.hpp 3 Feb 2007 09:04:30 -0000       1.18
+++ extends.hpp 13 Feb 2007 08:25:32 -0000      1.19
@@ -53,19 +53,39 @@
         }
 
         template<typename A>
-        typename generate<Domain, expr<tag::assign, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> >, tag::assign>::type const
+        typename generate<Domain, expr<tag::assign, args2<ref<Derived>, 
typename result_of::as_arg<A>::type> > >::type const
+        operator =(A &a) const
+        {
+            typedef expr<tag::assign, args2<ref<Derived>, typename 
result_of::as_arg<A>::type> > that_type;
+            that_type that = {{this->derived()}, proto::as_arg(a)};
+            return generate<Domain, that_type>::make(that);
+        }
+
+        template<typename A>
+        typename generate<Domain, expr<tag::assign, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> > >::type const
         operator =(A const &a) const
         {
-            expr<tag::assign, args2<ref<Derived>, typename result_of::as_arg<A 
const>::type> > that = {{this->derived()}, proto::as_arg(a)};
-            return generate<Domain, expr<tag::assign, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> >, tag::assign>::make(that);
+            typedef expr<tag::assign, args2<ref<Derived>, typename 
result_of::as_arg<A const>::type> > that_type;
+            that_type that = {{this->derived()}, proto::as_arg(a)};
+            return generate<Domain, that_type>::make(that);
         }
 
         template<typename A>
-        typename generate<Domain, expr<tag::subscript, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> >, tag::subscript>::type const
+        typename generate<Domain, expr<tag::subscript, args2<ref<Derived>, 
typename result_of::as_arg<A>::type> > >::type const
+        operator [](A &a) const
+        {
+            typedef expr<tag::subscript, args2<ref<Derived>, typename 
result_of::as_arg<A>::type> > that_type;
+            that_type that = {{this->derived()}, proto::as_arg(a)};
+            return generate<Domain, that_type>::make(that);
+        }
+
+        template<typename A>
+        typename generate<Domain, expr<tag::subscript, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> > >::type const
         operator [](A const &a) const
         {
-            expr<tag::subscript, args2<ref<Derived>, typename 
result_of::as_arg<A const>::type> > that = {{this->derived()}, 
proto::as_arg(a)};
-            return generate<Domain, expr<tag::subscript, args2<ref<Derived>, 
typename result_of::as_arg<A const>::type> >, tag::subscript>::make(that);
+            typedef expr<tag::subscript, args2<ref<Derived>, typename 
result_of::as_arg<A const>::type> > that_type;
+            that_type that = {{this->derived()}, proto::as_arg(a)};
+            return generate<Domain, that_type>::make(that);
         }
 
         template<typename Sig>
@@ -74,14 +94,14 @@
         template<typename This>
         struct result<This()>
         {
-            typedef typename generate<Domain, expr<tag::function, 
args1<ref<Derived> > >, tag::function>::type type;
+            typedef typename generate<Domain, expr<tag::function, 
args1<ref<Derived> > > >::type type;
         };
 
-        typename generate<Domain, expr<tag::function, args1<ref<Derived> > >, 
tag::function>::type const
+        typename generate<Domain, expr<tag::function, args1<ref<Derived> > > 
>::type const
         operator ()() const
         {
             expr<tag::function, args1<ref<Derived> > > that = 
{{this->derived()}};
-            return generate<Domain, expr<tag::function, args1<ref<Derived> > 
>, tag::function>::make(that);
+            return generate<Domain, expr<tag::function, args1<ref<Derived> > > 
>::make(that);
         }
 
     #define BOOST_PP_LOCAL_MACRO(N) \
@@ -97,7 +117,6 @@
                       , >::type BOOST_PP_INTERCEPT\
                     )\
                 >::type\
-              , tag::function\
             >\
         {};\
         template<BOOST_PP_ENUM_PARAMS(N, typename A)>\
@@ -107,7 +126,6 @@
                 Derived\
                 BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)\
             >::type\
-          , tag::function\
         >::type const\
         operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const &a)) const\
         {\
@@ -115,7 +133,7 @@
                 Derived\
                 BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)\
             > funop;\
-            return generate<Domain, typename funop::type, 
tag::function>::make(\
+            return generate<Domain, typename funop::type>::make(\
                 funop::call(this->derived() BOOST_PP_ENUM_TRAILING_PARAMS(N, 
a))\
             );\
         }\

Index: operators.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/operators.hpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- operators.hpp       3 Feb 2007 00:14:33 -0000       1.23
+++ operators.hpp       13 Feb 2007 08:25:32 -0000      1.24
@@ -22,7 +22,7 @@
 
 namespace boost { namespace proto
 {
-    template<typename Domain, typename Expr, typename Tag>
+    template<typename Domain, typename Expr, typename EnableIf>
     struct generate
     {
         typedef Expr type;

Index: proto_fwd.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/proto_fwd.hpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- proto_fwd.hpp       3 Feb 2007 23:48:49 -0000       1.49
+++ proto_fwd.hpp       13 Feb 2007 08:25:32 -0000      1.50
@@ -341,7 +341,7 @@
     template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, 
typename A, void), typename Dummy = void>
     struct function;
 
-    template<typename Domain, typename Expr, typename Tag = typename 
Expr::tag_type>
+    template<typename Domain, typename Expr, typename EnableIf = void>
     struct generate;
 
     namespace op


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to