$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r67341 - in sandbox/SOC/2009/fusion: boost/fusion/algorithm/transformation boost/fusion/container/detail boost/fusion/mpl/detail boost/fusion/sequence/intrinsic boost/proto libs/fusion/test/compile_time libs/fusion/test/compile_time/testcases/detail libs/fusion/test/suite1/algorithm
From: mr.chr.schmidt_at_[hidden]
Date: 2010-12-19 12:06:15
Author: cschmidt
Date: 2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
New Revision: 67341
URL: http://svn.boost.org/trac/boost/changeset/67341
Log:
minor update
Text files modified: 
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp     |     1                                         
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp          |    33 ++++-----                               
   sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/begin.hpp                       |     5                                         
   sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/end.hpp                         |     5                                         
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp               |    12 ++                                      
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp                 |    13 +++                                     
   sandbox/SOC/2009/fusion/boost/proto/fusion.hpp                                  |   139 ++++++++------------------------------- 
   sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/Jamfile                   |     5 +                                       
   sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/testcases/detail/main.hpp |    68 +++++++++++++------                     
   sandbox/SOC/2009/fusion/libs/fusion/test/suite1/algorithm/fold.hpp              |     1                                         
   10 files changed, 120 insertions(+), 162 deletions(-)
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -75,7 +75,6 @@
     }
 
     //TODO boost config macro for default arguments for function templates
-
     template<typename IsAssociative,typename Seq, typename F>
     inline typename
         result_of::transform<
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -1,11 +1,11 @@
 /*==============================================================================
-    Copyright (c) 2009 Christopher Schmidt
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifdef BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || 1
 #   include <boost/fusion/sequence/intrinsic/begin.hpp>
 #   include <boost/fusion/sequence/intrinsic/size.hpp>
 #endif
@@ -15,13 +15,11 @@
 //cschmidt: mpl's maximum supported arity is set to 5 by default. We need more
 //for the variadic templates implementations though. Therefore we use the pp
 //implementation for now.
-//TODO: native variadic template unrolled workaround!.
-
-//#ifdef BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || 1
 #   include <boost/fusion/container/detail/pp/as_seq.hpp>
-//#else
-//#   include <boost/fusion/container/detail/variadic_templates/as_seq.hpp>
-//#endif
+#else
+#   include <boost/fusion/container/detail/variadic_templates/as_seq.hpp>
+#endif
 
 namespace boost { namespace fusion
 {
@@ -36,7 +34,7 @@
             template<typename Seq>
             struct apply
             {
-//#ifdef BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || 1
                 typedef typename
                     detail::BOOST_PP_CAT(
                         BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME),_impl)<
@@ -45,14 +43,14 @@
                         typename result_of::begin<Seq>::type
                     >::type
                 type;
-//#else
-//              typedef typename
-//                  detail::BOOST_PP_CAT(
-//                      BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME),_impl)<
-//                      Seq
-//                  >::type
-//              type;
-//#endif
+#else
+              typedef typename
+                  detail::BOOST_PP_CAT(
+                      BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME),_impl)<
+                      Seq
+                  >::type
+              type;
+#endif
 
                 static type
                 call(Seq seq)
@@ -88,5 +86,4 @@
             BOOST_FUSION_R_ELSE_CLREF(Seq)
         >::call(BOOST_FUSION_FORWARD(Seq,seq));
     }
-
 }}
Modified: sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/begin.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/begin.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/begin.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -1,5 +1,6 @@
 /*==============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,9 +26,7 @@
         {
             typedef
                 fusion_iterator<
-                    typename fusion::result_of::begin<
-                        typename fusion::result_of::as_vector<Seq>::type
-                    >::type
+                    typename fusion::result_of::begin<Seq>::type
                 >
             type;
         };
Modified: sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/end.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/end.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/end.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -1,5 +1,6 @@
 /*==============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,9 +26,7 @@
         {
             typedef
                 fusion_iterator<
-                    typename fusion::result_of::end<
-                        typename fusion::result_of::as_vector<Seq>::type
-                    >::type
+                    typename fusion::result_of::end<Seq>::type
                 >
             type;
         };
Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -11,6 +11,8 @@
 
 #include <boost/fusion/support/internal/base.hpp>
 #include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/utility/enable_if.hpp>
 
 namespace boost { namespace fusion
 {
@@ -34,7 +36,10 @@
     }
 
     template<typename Seq>
-    inline typename result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+    inline typename lazy_enable_if<
+        traits::is_sequence<BOOST_FUSION_R_ELSE_CLREF(Seq)>
+      , result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>
+    >::type
     begin(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
     {
         return result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::call(
@@ -43,7 +48,10 @@
 
 #ifdef BOOST_FUSION_NO_RVALUE_REFERENCES
     template<typename Seq>
-    inline typename result_of::begin<Seq&>::type
+    inline typename lazy_enable_if<
+        traits::is_sequence<Seq&>
+      , result_of::begin<Seq&>
+    >::type
     begin(Seq& seq)
     {
         return result_of::begin<Seq&>::call(seq);
Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -1,5 +1,6 @@
 /*==============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,6 +11,8 @@
 
 #include <boost/fusion/support/internal/base.hpp>
 #include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/utility/enable_if.hpp>
 
 namespace boost { namespace fusion
 {
@@ -32,7 +35,10 @@
     }
 
     template<typename Seq>
-    inline typename result_of::end<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+    inline typename lazy_enable_if<
+        traits::is_sequence<BOOST_FUSION_R_ELSE_CLREF(Seq)>
+      , result_of::end<BOOST_FUSION_R_ELSE_CLREF(Seq)>
+    >::type
     end(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
     {
         return result_of::end<BOOST_FUSION_R_ELSE_CLREF(Seq)>::call(
@@ -41,7 +47,10 @@
 
 #ifdef BOOST_FUSION_NO_RVALUE_REFERENCES
     template<typename Seq>
-    inline typename result_of::end<Seq&>::type
+    inline typename lazy_enable_if<
+        traits::is_sequence<Seq&>
+      , result_of::end<Seq&>
+    >::type
     end(Seq& seq)
     {
         return result_of::end<Seq&>::call(seq);
Modified: sandbox/SOC/2009/fusion/boost/proto/fusion.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/proto/fusion.hpp	(original)
+++ sandbox/SOC/2009/fusion/boost/proto/fusion.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -18,8 +18,6 @@
 #include <boost/fusion/include/category_of.hpp>
 #include <boost/fusion/include/iterator_base.hpp>
 #include <boost/fusion/include/intrinsic.hpp>
-#include <boost/fusion/include/pop_front.hpp>
-#include <boost/fusion/include/reverse.hpp>
 #include <boost/fusion/include/single_view.hpp>
 #include <boost/fusion/include/transform_view.hpp>
 #include <boost/fusion/support/ext_/is_segmented.hpp>
@@ -40,10 +38,8 @@
 
 namespace boost { namespace proto
 {
-
     namespace detail
     {
-
         template<typename Expr, long Pos>
         struct expr_iterator
           : fusion::iterator_base<expr_iterator<Expr, Pos> >
@@ -172,92 +168,6 @@
                 return proto::detail::flat_view<Expr const>(e);
             }
         };
-
-        /// \brief A PolymorphicFunctionObject type that invokes the
-        /// \c fusion::pop_front() algorithm on its argument.
-        ///
-        /// A PolymorphicFunctionObject type that invokes the
-        /// \c fusion::pop_front() algorithm on its argument. This is
-        /// useful for defining a CallableTransform like \c pop_front(_)
-        /// which removes the first child from a Proto expression node.
-        /// Such a transform might be used as the first argument to the
-        /// \c proto::fold\<\> transform; that is, fold all but
-        /// the first child.
-        struct pop_front
-        {
-            BOOST_PROTO_CALLABLE()
-
-            template<typename Sig>
-            struct result;
-
-            template<typename This, typename Expr>
-            struct result<This(Expr)>
-              : result<This(Expr const &)>
-            {};
-
-            template<typename This, typename Expr>
-            struct result<This(Expr &)>
-              : fusion::result_of::pop_front<Expr>
-            {};
-
-            template<typename Expr>
-            typename fusion::result_of::pop_front<Expr>::type
-            operator ()(Expr &e) const
-            {
-                // Work around a const-correctness issue in Fusion
-                typedef typename fusion::result_of::pop_front<Expr>::type result_type;
-                return result_type(fusion::next(fusion::begin(e)), fusion::end(e));
-            }
-
-            template<typename Expr>
-            typename fusion::result_of::pop_front<Expr const>::type
-            operator ()(Expr const &e) const
-            {
-                return fusion::pop_front(e);
-            }
-        };
-
-        /// \brief A PolymorphicFunctionObject type that invokes the
-        /// \c fusion::reverse() algorithm on its argument.
-        ///
-        /// A PolymorphicFunctionObject type that invokes the
-        /// \c fusion::reverse() algorithm on its argument. This is
-        /// useful for defining a CallableTransform like \c reverse(_)
-        /// which reverses the order of the children of a Proto
-        /// expression node.
-        struct reverse
-        {
-            BOOST_PROTO_CALLABLE()
-
-            template<typename Sig>
-            struct result;
-
-            template<typename This, typename Expr>
-            struct result<This(Expr)>
-              : result<This(Expr const &)>
-            {};
-
-            template<typename This, typename Expr>
-            struct result<This(Expr &)>
-              : fusion::result_of::reverse<Expr>
-            {};
-
-            template<typename Expr>
-            typename fusion::result_of::reverse<Expr>::type
-            operator ()(Expr &e) const
-            {
-                // Work around a const-correctness issue in Fusion
-                typedef typename fusion::result_of::reverse<Expr>::type result_type;
-                return result_type(e);
-            }
-
-            template<typename Expr>
-            typename fusion::result_of::reverse<Expr const>::type
-            operator ()(Expr const &e) const
-            {
-                return fusion::reverse(e);
-            }
-        };
     }
 
     /// \brief A function that returns a "flattened"
@@ -289,29 +199,9 @@
 
     /// INTERNAL ONLY
     ///
-    template<>
-    struct is_callable<functional::flatten>
-      : mpl::true_
-    {};
-
-    /// INTERNAL ONLY
-    ///
-    template<>
-    struct is_callable<functional::pop_front>
-      : mpl::true_
-    {};
-
-    /// INTERNAL ONLY
-    ///
-    template<>
-    struct is_callable<functional::reverse>
-      : mpl::true_
-    {};
-
-    /// INTERNAL ONLY
-    ///
     template<typename Context>
     struct eval_fun
+      : proto::callable
     {
         explicit eval_fun(Context &ctx)
           : ctx_(ctx)
@@ -347,12 +237,39 @@
     private:
         Context &ctx_;
     };
+
+    /// INTERNAL ONLY
+    ///
+    template<typename Context>
+    struct is_callable<eval_fun<Context> >
+      : mpl::true_
+    {};
 }}
 
 namespace boost { namespace fusion
 {
     namespace extension
     {
+        template<typename Tag>
+        struct is_sequence_impl;
+
+        template<>
+        struct is_sequence_impl<proto::tag::proto_flat_view>
+        {
+            template<typename Sequence>
+            struct apply
+              : mpl::true_
+            {};
+        };
+
+        template<>
+        struct is_sequence_impl<proto::tag::proto_expr>
+        {
+            template<typename Sequence>
+            struct apply
+              : mpl::true_
+            {};
+        };
 
         template<typename Tag>
         struct is_view_impl;
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/Jamfile
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/Jamfile	(original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/Jamfile	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -122,7 +122,10 @@
 
 #Plotter
 exe plotter
-  : plotter/main.cpp /boost/date_time//boost_date_time
+  : plotter/main.cpp
+    /boost/date_time//boost_date_time
+#fix warnings in Boost.DateTime
+  : <toolset>gcc:<cxxflags>-Wno-long-long
   ;
 JAM_SEMAPHORE on plotter = fusion-compile-time-test ;
 
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/testcases/detail/main.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/testcases/detail/main.hpp	(original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/compile_time/testcases/detail/main.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -5,62 +5,88 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-template<int X, int Y, int Z>
-struct frame_z
+#ifdef TWO_DIMENSIONAL
+template<int X, int Y>
+struct frame_last_it
+{
+    static void
+    call()
+    {
+        test_impl<X, Y>();
+
+        frame_last_it<X, Y+1>();
+    }
+};
+
+template<int X, int Y>
+struct frame_last_it<X, TWO_DIMENSIONAL>
+{
+    static void
+    call()
+    {}
+};
+#endif
+
+template<int A, int B, int C>
+struct frame_abc
 {
     static void
     call()
     {
-        test_impl<
-            X*BOOST_FUSION_COMPILE_TIME_TEST_RES*
+        static const int it=
+            A*BOOST_FUSION_COMPILE_TIME_TEST_RES*
                 BOOST_FUSION_COMPILE_TIME_TEST_RES+
-            Y*BOOST_FUSION_COMPILE_TIME_TEST_RES+
-            Z
-        >();
+            B*BOOST_FUSION_COMPILE_TIME_TEST_RES+
+            C;
+#ifdef TWO_DIMENSIONAL
+        frame_last_it<it, 0>();
+#else
+        test_impl<it>();
+#endif
     }
 };
 
 
-template<int X, int Y>
-struct frame_z<X, Y, BOOST_FUSION_COMPILE_TIME_TEST_RES>
+template<int A, int B>
+struct frame_abc<A, B, BOOST_FUSION_COMPILE_TIME_TEST_RES>
 {
     static void
     call()
     {}
 };
 
-template<int X, int Y>
-struct frame_y
+template<int A, int B>
+struct frame_ab
 {
     static void
     call()
     {
-        frame_z<X, Y, 0>::call();
-        frame_y<X, Y+1>::call();
+        frame_abc<A, B, 0>::call();
+        frame_ab<A, B+1>::call();
     }
 };
 
-template<int X>
-struct frame_y<X, BOOST_FUSION_COMPILE_TIME_TEST_RES>
+template<int A>
+struct frame_ab<A, BOOST_FUSION_COMPILE_TIME_TEST_RES>
 {
     static void
     call()
     {}
 };
 
-template<int X>
-struct frame_x
+template<int A>
+struct frame_a
 {
     static void
     call()
     {
-        frame_y<X, 0>::call();
-        frame_x<X+1>::call();
+        frame_ab<A, 0>::call();
+        frame_a<A+1>::call();
     }
 };
 
 template<>
-struct frame_x<BOOST_FUSION_COMPILE_TIME_TEST_RES>
+struct frame_a<BOOST_FUSION_COMPILE_TIME_TEST_RES>
 {
     static void
     call()
@@ -69,7 +95,7 @@
 
 int main()
 {
-    frame_x<0>::call();
+    frame_a<0>::call();
 
     return result;
 }
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/suite1/algorithm/fold.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/suite1/algorithm/fold.hpp	(original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/suite1/algorithm/fold.hpp	2010-12-19 12:05:50 EST (Sun, 19 Dec 2010)
@@ -143,6 +143,7 @@
 
         {
             mpl::range_c<int, 1, n+1> init_range;
+
             typename fusion::result_of::as_vector<
                 typename mpl::transform<
                     range