Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54728 - in sandbox/SOC/2009/fusion/boost/fusion/algorithm: iteration iteration/detail query/detail transformation
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-06 17:08:07


Author: cschmidt
Date: 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
New Revision: 54728
URL: http://svn.boost.org/trac/boost/changeset/54728

Log:
optimized iteration algorithm
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp | 18 --
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp | 258 ++++++++++-----------------------------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp | 55 -------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp | 45 ++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp | 10
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp | 1
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/any.hpp | 1
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count_if.hpp | 1
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp | 1
   9 files changed, 94 insertions(+), 296 deletions(-)

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -26,23 +26,6 @@
     template <typename Seq, typename State, typename F>
     inline typename result_of::accumulate<
         BOOST_FUSION_R_ELSE_LREF(Seq)
- , BOOST_FUSION_R_ELSE_LREF(State)
- , BOOST_FUSION_R_ELSE_LREF(F)
- >::type
- accumulate(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_LREF(State) state,
- BOOST_FUSION_R_ELSE_LREF(F) f)
- {
- return fusion::fold(
- BOOST_FUSION_FORWARD(Seq,seq),
- BOOST_FUSION_FORWARD(State,state),
- BOOST_FUSION_FORWARD(F,f));
- }
-
-#ifdef BOOST_NO_RVALUE_REFERENCES
- template <typename Seq, typename State, typename F>
- inline typename result_of::accumulate<
- BOOST_FUSION_R_ELSE_LREF(Seq)
       , BOOST_FUSION_R_ELSE_CLREF(State)
       , BOOST_FUSION_R_ELSE_LREF(F)
>::type
@@ -55,7 +38,6 @@
                 BOOST_FUSION_FORWARD(State,state),
                 BOOST_FUSION_FORWARD(F,f));
     }
-#endif
 }}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -12,11 +12,11 @@
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
 #include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/iterator/deref.hpp>
 #include <boost/fusion/iterator/value_of.hpp>
 #include <boost/fusion/iterator/next.hpp>
-#include <boost/fusion/iterator/distance.hpp>
 #include <boost/fusion/support/result_of.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -25,73 +25,45 @@
 
 namespace boost { namespace fusion
 {
- namespace result_of
- {
- template <typename Seq, typename State, typename F>
- struct fold;
- }
-
     namespace detail
     {
- template <typename It, typename State, typename F>
+ template <typename ItRef, typename StateRef, typename FRef>
         struct fold_apply
           : support::result_of<
- F(
- typename result_of::deref<It>::type
- , State
+ FRef(
+ typename result_of::deref<ItRef>::type
+ , StateRef
                 )
>
         {};
 
- template <typename First, typename Last, typename State, typename F>
- struct static_fold;
-
- template <typename First, typename Last, typename State, typename F>
- struct next_result_of_fold
- : static_fold<
- typename result_of::next<First>::type
- , Last
- , typename fold_apply<First, State, F>::type
- , F
- >
- {
- };
-
- template <typename First, typename Last, typename State, typename F>
- struct static_fold
- {
- typedef typename
- mpl::eval_if<
- result_of::equal_to<First, Last>
- , mpl::identity<State>
- , next_result_of_fold<First, Last, State, F>
- >::type
- type;
- };
-
- template<typename It0, typename State, typename F, int N>
+ template<typename It0Ref, typename State, typename F, int N>
         struct result_of_unrolled_fold;
 
         template<int N>
         struct unrolled_fold
         {
             template<typename It0, typename State, typename F>
- static typename result_of_unrolled_fold<It0, State, F, N>::type
+ static typename
+ result_of_unrolled_fold<
+ It0 const&
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ , N
+ >::type
             call(It0 const& it0,
- BOOST_FUSION_R_ELSE_LREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
                     BOOST_FUSION_R_ELSE_LREF(F) f)
             {
- typedef typename result_of::next<It0>::type It1;
+ typedef typename result_of::next<It0 const&>::type It1;
                 It1 it1 = fusion::next(it0);
- typedef typename result_of::next<It1>::type It2;
+ typedef typename result_of::next<It1&>::type It2;
                 It2 it2 = fusion::next(it1);
- typedef typename result_of::next<It2>::type It3;
+ typedef typename result_of::next<It2&>::type It3;
                 It3 it3 = fusion::next(it2);
- typedef typename result_of::next<It3>::type It4;
- It4 it4 = fusion::next(it3);
 
                 return unrolled_fold<N-4>::call(
- it4,
+ fusion::next(it3),
                         f(fusion::deref(it3),
                             f(fusion::deref(it2),
                                 f(fusion::deref(it1),
@@ -109,14 +81,19 @@
         struct unrolled_fold<3>
         {
             template<typename It0, typename State, typename F>
- static typename result_of_unrolled_fold<It0, State, F, 3>::type
+ static typename
+ result_of_unrolled_fold<
+ It0 const&
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ , 3>::type
             call(It0 const& it0,
- BOOST_FUSION_R_ELSE_LREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
                     BOOST_FUSION_R_ELSE_LREF(F) f)
             {
- typedef typename result_of::next<It0>::type It1;
+ typedef typename result_of::next<It0 const&>::type It1;
                 It1 it1 = fusion::next(it0);
- typedef typename result_of::next<It1>::type It2;
+ typedef typename result_of::next<It1&>::type It2;
                 It2 it2 = fusion::next(it1);
 
                 return f(fusion::deref(it2),
@@ -134,15 +111,18 @@
         struct unrolled_fold<2>
         {
             template<typename It0, typename State, typename F>
- static typename result_of_unrolled_fold<It0, State, F, 2>::type
+ static typename
+ result_of_unrolled_fold<
+ It0 const&
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ , 2
+ >::type
             call(It0 const& it0,
- BOOST_FUSION_R_ELSE_LREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
                     BOOST_FUSION_R_ELSE_LREF(F) f)
             {
- typedef typename result_of::next<It0>::type It1;
- It1 it1 = fusion::next(it0);
-
- return f(fusion::deref(it1),
+ return f(fusion::deref(fusion::next(it0)),
                         f(fusion::deref(it0),
                           BOOST_FUSION_FORWARD(State,state)));
             }
@@ -152,9 +132,15 @@
         struct unrolled_fold<1>
         {
             template<typename It0, typename State, typename F>
- static typename result_of_unrolled_fold<It0, State, F, 1>::type
+ static typename
+ result_of_unrolled_fold<
+ It0 const&
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ , 1
+ >::type
             call(It0 const& it0,
- BOOST_FUSION_R_ELSE_LREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
                     BOOST_FUSION_R_ELSE_LREF(F) f)
             {
                 return f(fusion::deref(it0), BOOST_FUSION_FORWARD(State,state));
@@ -165,175 +151,69 @@
         struct unrolled_fold<0>
         {
             template<typename It0, typename State, typename F>
- static State
+ static BOOST_FUSION_R_ELSE_CLREF(State)
             call(It0 const&,
- BOOST_FUSION_R_ELSE_LREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
                     BOOST_FUSION_R_ELSE_LREF(F))
             {
                 return state;
             }
         };
 
- // terminal case
- template <typename First, typename Last, typename State, typename F>
- inline BOOST_FUSION_R_ELSE_LREF(State)
- linear_fold(First const&,
- Last const&,
- BOOST_FUSION_R_ELSE_LREF(State) state,
- BOOST_FUSION_R_ELSE_LREF(F),
- mpl::true_)
- {
- return state;
- }
-
- // non-terminal case
- template <typename First, typename Last, typename State, typename F>
- inline typename static_fold<First, Last, State, F>::type
- linear_fold(
- First const& first
- , Last const& last
- , BOOST_FUSION_R_ELSE_CLREF(State) state
- , BOOST_FUSION_R_ELSE_CLREF(F) f
- , mpl::false_)
- {
- return detail::linear_fold(
- fusion::next(first)
- , last
- , f(*first, state)
- , BOOST_FUSION_FORWARD(F,f)
- , result_of::equal_to<
- typename result_of::next<First>::type, Last
- >()
- );
- }
-
- template<typename It0, typename State, typename F, int N>
+ template<typename It0, typename StateRef, typename FRef, int N>
         struct result_of_unrolled_fold
         {
             typedef typename result_of::next<It0>::type It1;
             typedef typename result_of::next<It1>::type It2;
             typedef typename result_of::next<It2>::type It3;
             typedef typename result_of::next<It3>::type It4;
- typedef typename fold_apply<It0, State, F>::type Rest1;
- typedef typename fold_apply<It1, Rest1, F>::type Rest2;
- typedef typename fold_apply<It2, Rest2, F>::type Rest3;
- typedef typename fold_apply<It3, Rest3, F>::type Rest4;
+ typedef typename fold_apply<It0, StateRef, FRef>::type Rest1;
+ typedef typename fold_apply<It1, Rest1, FRef>::type Rest2;
+ typedef typename fold_apply<It2, Rest2, FRef>::type Rest3;
+ typedef typename fold_apply<It3, Rest3, FRef>::type Rest4;
 
             typedef typename
- result_of_unrolled_fold<It4, Rest4, F, N-4>::type
+ result_of_unrolled_fold<It4, Rest4, FRef, N-4>::type
             type;
         };
 
- template<typename It0, typename State, typename F>
- struct result_of_unrolled_fold<It0, State, F, 3>
+ template<typename It0Ref, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0Ref, StateRef, FRef, 3>
         {
- typedef typename result_of::next<It0>::type It1;
+ typedef typename result_of::next<It0Ref>::type It1;
             typedef typename result_of::next<It1>::type It2;
- typedef typename fold_apply<It0, State, F>::type Rest;
- typedef typename fold_apply<It1, Rest, F>::type Rest2;
+ typedef typename fold_apply<It0Ref, StateRef, FRef>::type Rest;
+ typedef typename fold_apply<It1, Rest, FRef>::type Rest2;
 
             typedef typename
- fold_apply<It2, Rest2, F>::type
+ fold_apply<It2, Rest2, FRef>::type
             type;
         };
 
- template<typename It0, typename State, typename F>
- struct result_of_unrolled_fold<It0, State, F, 2>
+ template<typename It0Ref, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0Ref, StateRef, FRef, 2>
         {
- typedef typename result_of::next<It0>::type It1;
- typedef typename fold_apply<It0, State, F>::type Rest;
+ typedef typename result_of::next<It0Ref>::type It1;
+ typedef typename fold_apply<It0Ref, StateRef, FRef>::type Rest;
 
             typedef typename
- fold_apply<It1, Rest, F>::type
+ fold_apply<It1, Rest, FRef>::type
             type;
         };
 
- template<typename It0, typename State, typename F>
- struct result_of_unrolled_fold<It0, State, F, 1>
+ template<typename It0Ref, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0Ref, StateRef, FRef, 1>
         {
             typedef typename
- fold_apply<It0, State, F>::type
+ fold_apply<It0Ref, StateRef, FRef>::type
             type;
         };
 
- template<typename It0, typename State, typename F>
- struct result_of_unrolled_fold<It0, State, F, 0>
+ template<typename It0Ref, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0Ref, StateRef, FRef, 0>
         {
- typedef State type;
+ typedef StateRef type;
         };
-
- template<typename SeqRef, typename State, typename F, bool>
- struct choose_fold;
-
- template<typename SeqRef, typename State, typename F>
- struct choose_fold<SeqRef, State, F, true>
- {
- typedef typename result_of::begin<SeqRef>::type begin;
- typedef typename result_of::end<SeqRef>::type end;
-
- typedef typename
- result_of_unrolled_fold<
- begin
- , State
- , F
- , result_of::size<SeqRef>::value
- >::type
- type;
- };
-
- template<typename SeqRef, typename State, typename F>
- struct choose_fold<SeqRef, State, F, false>
- {
- typedef typename
- detail::static_fold<
- typename result_of::begin<SeqRef>::type
- , typename result_of::end<SeqRef>::type
- , State
- , F
- >::type
- type;
- };
-
- template<typename Seq, typename State, typename F, typename Tag>
- typename result_of::fold<Seq, State, F>::type
- fold(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_CLREF(State) state,
- BOOST_FUSION_R_ELSE_CLREF(F) f,
- Tag)
- {
- return linear_fold(
- fusion::begin(seq)
- , fusion::end(seq)
- , BOOST_FUSION_FORWARD(State,state)
- , BOOST_FUSION_FORWARD(F,f)
- , result_of::equal_to<
- typename result_of::begin<Seq>::type
- , typename result_of::end<Seq>::type
- >()
- );
- }
-
- template<typename Seq, typename State, typename F>
- typename result_of::fold<Seq, State, F>::type
- fold(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_CLREF(State) state,
- BOOST_FUSION_R_ELSE_CLREF(F) f,
- random_access_traversal_tag)
- {
- typedef
- unrolled_fold<
- result_of::distance<
- typename result_of::begin<Seq>::type
- , typename result_of::end<Seq>::type
- >::value
- >
- gen;
-
- return gen::call(
- fusion::begin(seq)
- , BOOST_FUSION_FORWARD(State,state)
- , BOOST_FUSION_FORWARD(F,f));
- }
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -11,51 +11,15 @@
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
 #include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/iterator/next.hpp>
 #include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/iterator/distance.hpp>
 
 #include <boost/mpl/bool.hpp>
 
 namespace boost { namespace fusion { namespace detail
 {
- template <typename SeqRef, typename First, typename F>
- inline void
- for_each_linear(First const&, BOOST_FUSION_R_ELSE_LREF(F), mpl::true_)
- {
- }
-
- template <typename SeqRef, typename First, typename F>
- inline void
- for_each_linear(First const& first,
- BOOST_FUSION_R_ELSE_LREF(F) f,
- mpl::false_)
- {
- f(*first);
-
- detail::for_each_linear<SeqRef>(
- fusion::next(first),
- BOOST_FUSION_FORWARD(F,f),
- result_of::equal_to<
- typename result_of::next<First>::type
- , typename result_of::end<SeqRef>::type
- >());
- }
-
-
- template <typename Seq, typename F, typename Tag>
- inline void
- for_each(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_LREF(F) f,
- Tag)
- {
- detail::for_each_linear<BOOST_FUSION_R_ELSE_LREF(Seq)>(
- fusion::begin(seq)
- , f
- , typename result_of::empty<Seq>::type());
- }
-
     template<int N>
     struct for_each_unrolled
     {
@@ -76,7 +40,9 @@
             It3 it3(fusion::next(it2));
             f(fusion::deref(it3));
 
- for_each_unrolled<N-4>::call(fusion::next(it3), f);
+ for_each_unrolled<N-4>::call(
+ fusion::next(it3)
+ , BOOST_FUSION_FORWARD(F,f));
         }
     };
 
@@ -116,7 +82,7 @@
     struct for_each_unrolled<1>
     {
         template<typename It0, typename F>
- static void call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F))
+ static void call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
         {
             f(fusion::deref(it0));
         }
@@ -130,17 +96,6 @@
         {
         }
     };
-
- template <typename Seq, typename F>
- inline void
- for_each(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_LREF(F) f,
- random_access_traversal_tag)
- {
- for_each_unrolled<result_of::empty<Seq>::value>::call(
- fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),
- BOOST_FUSION_FORWARD(F,f));
- }
 }}}
 
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -9,7 +9,7 @@
 #ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
 #define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
 
-#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
 #include <boost/fusion/support/ref.hpp>
 
 #include <boost/type_traits/is_base_of.hpp>
@@ -24,14 +24,11 @@
     {
         template <typename Seq, typename State, typename F>
         struct fold
- : fusion::detail::choose_fold<
- typename detail::add_lref<Seq>::type
+ : detail::result_of_unrolled_fold<
+ typename result_of::begin<Seq>::type
               , typename detail::add_lref<State>::type
               , typename detail::add_lref<F>::type
- , is_base_of<
- random_access_traversal_tag
- , typename traits::category_of<Seq>::type
- >::value
+ , result_of::size<Seq>::value
>
         {};
     }
@@ -39,24 +36,6 @@
     template <typename Seq, typename State, typename F>
     inline typename result_of::fold<
         BOOST_FUSION_R_ELSE_LREF(Seq)
- , BOOST_FUSION_R_ELSE_LREF(State)
- , BOOST_FUSION_R_ELSE_LREF(F)
- >::type
- fold(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_LREF(State) state,
- BOOST_FUSION_R_ELSE_LREF(F) f)
- {
- return detail::fold(
- BOOST_FUSION_FORWARD(Seq,seq),
- BOOST_FUSION_FORWARD(State,state),
- BOOST_FUSION_FORWARD(F,f),
- typename traits::category_of<Seq>::type());
- }
-
-#ifdef BOOST_NO_RVALUE_REFERENCES
- template <typename Seq, typename State, typename F>
- inline typename result_of::fold<
- BOOST_FUSION_R_ELSE_LREF(Seq)
       , BOOST_FUSION_R_ELSE_CLREF(State)
       , BOOST_FUSION_R_ELSE_LREF(F)
>::type
@@ -64,13 +43,17 @@
          BOOST_FUSION_R_ELSE_CLREF(State) state,
          BOOST_FUSION_R_ELSE_LREF(F) f)
     {
- return detail::fold(
- BOOST_FUSION_FORWARD(Seq,seq),
- BOOST_FUSION_FORWARD(State,state),
- BOOST_FUSION_FORWARD(F,f),
- typename traits::category_of<Seq>::type());
+ typedef
+ detail::unrolled_fold<
+ result_of::size<BOOST_FUSION_R_ELSE_LREF(Seq)>::value
+ >
+ gen;
+
+ return gen::call(
+ fusion::begin(seq)
+ , BOOST_FUSION_FORWARD(State,state)
+ , BOOST_FUSION_FORWARD(F,f));
     }
-#endif
 }}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -9,7 +9,7 @@
 #ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOR_EACH_HPP
 #define BOOST_FUSION_ALGORITHM_ITERATION_FOR_EACH_HPP
 
-#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
 #include <boost/fusion/support/ref.hpp>
 
 #include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
@@ -27,15 +27,15 @@
         };
     }
 
-
     template <typename Seq, typename F>
     inline void
     for_each(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
              BOOST_FUSION_R_ELSE_LREF(F) f)
     {
- detail::for_each(BOOST_FUSION_FORWARD(Seq,seq),
- BOOST_FUSION_FORWARD(F,f),
- typename traits::category_of<Seq>::type());
+ detail::for_each_unrolled<
+ result_of::size<BOOST_FUSION_R_ELSE_LREF(Seq)>::value
+ >::call(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),
+ BOOST_FUSION_FORWARD(F,f));
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -17,7 +17,6 @@
 #include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/iterator/next.hpp>
 #include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/iterator/distance.hpp>
 
 #include <boost/mpl/bool.hpp>
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/any.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/any.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/any.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -17,7 +17,6 @@
 #include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/iterator/next.hpp>
 #include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/iterator/distance.hpp>
 
 #include <boost/mpl/bool.hpp>
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count_if.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -16,7 +16,6 @@
 #include <boost/fusion/iterator/next.hpp>
 #include <boost/fusion/iterator/deref.hpp>
 #include <boost/fusion/iterator/equal_to.hpp>
-#include <boost/fusion/iterator/distance.hpp>
 #include <boost/fusion/iterator/advance.hpp>
 
 #include <boost/mpl/bool.hpp>

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp 2009-07-06 17:08:05 EDT (Mon, 06 Jul 2009)
@@ -41,6 +41,7 @@
     erase_key(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
         typedef result_of::erase_key<BOOST_FUSION_R_ELSE_LREF(Seq), Key> result;
+
         return erase(BOOST_FUSION_FORWARD(Seq,seq), result::gen::call(seq));
     }
 }}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk