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

Modified Files:
        lambda.cpp proto_fusion.cpp proto_fusion_s.cpp toy_spirit2.cpp 
Log Message:
simple changes for Boost v1.34 compatibility

Index: lambda.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/lambda.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- lambda.cpp  29 Mar 2007 22:19:39 -0000      1.9
+++ lambda.cpp  4 Apr 2007 06:42:26 -0000       1.10
@@ -10,8 +10,17 @@
 #include <boost/mpl/min_max.hpp>
 #include <boost/mpl/eval_if.hpp>
 #include <boost/mpl/next_prior.hpp>
-#include <boost/fusion/tuple.hpp>
+#if BOOST_VERSION < 103500
+# include <boost/spirit/fusion/sequence/at.hpp>
+# include <boost/spirit/fusion/sequence/tuple.hpp>
+namespace boost { namespace fusion { namespace result_of { using namespace 
meta; }}}
+#else
+# include <boost/fusion/tuple.hpp>
+#endif
 #include <boost/typeof/typeof.hpp>
+#include <boost/typeof/std/sstream.hpp>
+#include <boost/typeof/std/ostream.hpp>
+#include <boost/typeof/std/iostream.hpp>
 #include <boost/type_traits/add_const.hpp>
 #include <boost/type_traits/add_reference.hpp>
 #include <boost/xpressive/proto/proto.hpp>
@@ -89,7 +98,11 @@
         typedef typename fusion::result_of::at<Tuple, index>::type result_type;
         result_type operator()(Expr const &expr, lambda_context<Tuple> &ctx)
         {
+#if BOOST_VERSION < 103500
+            return fusion::at<index::value>(ctx.args_);
+#else
             return fusion::at<index>(ctx.args_);
+#endif
         }
     };
 

Index: proto_fusion.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/proto_fusion.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- proto_fusion.cpp    15 Feb 2007 23:06:56 -0000      1.3
+++ proto_fusion.cpp    4 Apr 2007 06:42:26 -0000       1.4
@@ -5,6 +5,11 @@
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include <boost/version.hpp>
+#if BOOST_VERSION < 103500
+# error This test only works on Boost v1.35
+#endif
+
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/fusion.hpp>
 #include <boost/fusion/algorithm/iteration/for_each.hpp>

Index: proto_fusion_s.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/proto_fusion_s.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- proto_fusion_s.cpp  15 Feb 2007 23:06:56 -0000      1.3
+++ proto_fusion_s.cpp  4 Apr 2007 06:42:26 -0000       1.4
@@ -5,6 +5,11 @@
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#include <boost/version.hpp>
+#if BOOST_VERSION < 103500
+# error This test only works on Boost v1.35
+#endif
+
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/fusion.hpp>
 #include <boost/fusion/algorithm/iteration/ext_/for_each_s.hpp>

Index: toy_spirit2.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/toy_spirit2.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- toy_spirit2.cpp     3 Feb 2007 18:05:58 -0000       1.9
+++ toy_spirit2.cpp     4 Apr 2007 06:42:26 -0000       1.10
@@ -17,9 +17,15 @@
 #include <boost/xpressive/proto/transform/arg.hpp>
 #include <boost/xpressive/proto/transform/construct.hpp>
 #include <boost/xpressive/proto/transform/fold_to_list.hpp>
+#if BOOST_VERSION < 103500
+# include <boost/spirit/fusion/algorithm/for_each.hpp>
+# include <boost/spirit/fusion/algorithm/fold.hpp>
+# include <boost/spirit/fusion/algorithm/any.hpp>
+#else
 #include <boost/fusion/algorithm/iteration/for_each.hpp>
 #include <boost/fusion/algorithm/iteration/fold.hpp>
 #include <boost/fusion/algorithm/query/any.hpp>
+#endif
 #include <boost/test/unit_test.hpp>
 
 namespace boost
@@ -399,11 +405,19 @@
           : with_reset(begin, end)
         {}
 
+#if BOOST_VERSION < 103500
+        template<typename, typename> // used by fusion::fold
+        struct apply
+        {
+            typedef bool type;
+        };
+#else
         template<typename, typename> // used by fusion::fold
         struct result
         {
             typedef bool type;
         };
+#endif
 
         template<typename T>
         bool operator()(T const &t, bool success) const // used by fusion::fold


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to