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

Modified Files:
        construct.hpp 
Log Message:
construct<> with non-function type behaves like compose<>

Index: construct.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/transform/construct.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- construct.hpp       9 Jul 2007 18:11:19 -0000       1.12
+++ construct.hpp       26 Jul 2007 20:38:06 -0000      1.13
@@ -122,6 +122,23 @@
             {}
         }
 
+        template<typename Grammar, typename ConstructorFun>
+        struct construct
+          : Grammar
+        {
+            template<typename Expr, typename State, typename Visitor>
+            struct apply
+              : ConstructorFun::template apply<typename Grammar::template 
apply<Expr, State, Visitor>::type, State, Visitor>
+            {};
+
+            template<typename Expr, typename State, typename Visitor>
+            static typename apply<Expr, State, Visitor>::type
+            call(Expr const &expr, State const &state, Visitor &visitor)
+            {
+                return ConstructorFun::call(Grammar::call(expr, state, 
visitor), state, visitor);
+            }
+        };
+
         #define BOOST_PROTO_APPLY_(Z, N, DATA)                                 
                     \
             typename apply_<BOOST_PP_CAT(DATA, N), Expr, State, Visitor>::type 
                     \
             /**/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to