Boost logo

Boost-Commit :

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


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

Log:
cleanup
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count_if.hpp | 2 ++
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp | 1 +
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp | 7 ++++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp | 7 ++++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp | 6 ++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp | 21 ++++++++++++++++++---
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp | 7 ++++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp | 4 +---
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp | 4 +---
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp | 11 ++++++-----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp | 5 ++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp | 7 ++++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp | 8 +-------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp | 8 +++++++-
   14 files changed, 67 insertions(+), 31 deletions(-)

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:24:12 EDT (Mon, 06 Jul 2009)
@@ -23,6 +23,8 @@
 namespace boost { namespace fusion {
     struct random_access_traversal_tag;
 
+ //code based on fold!!!
+
     namespace detail
     {
         template <typename SeqRef, typename First, typename F>

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -91,6 +91,7 @@
>
             right_type;
 
+ //TODO !!!
             typedef
                 joint_view<left_type, right_type>
             type;

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -22,7 +22,12 @@
         template <typename Seq, typename T>
         struct filter
         {
- typedef filter_view<Seq, is_same<mpl::_, T> > type;
+ typedef
+ filter_view<
+ typename detail::add_lref<Seq>::type
+ , is_same<mpl::_, T>
+ >
+ type;
         };
     }
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -17,7 +17,12 @@
         template <typename Seq, typename Pred>
         struct filter_if
         {
- typedef filter_view<Seq, Pred> type;
+ typedef
+ filter_view<
+ typename detail::add_lref<Seq>::type
+ , Pred
+ >
+ type;
         };
     }
     

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -19,12 +19,10 @@
         template <typename Seq, typename Pos, typename T>
         struct insert
           : insert_range<
- Seq
- , Pos
- //TODO cschmidt!!!
+ typename detail::add_lref<Seq>::type
+ , typename detail::add_lref<Pos>::type
               , BOOST_FUSION_R_ELSE_CLREF(
                       single_view<typename detail::as_fusion_element<T>::type>)
-
>
         {
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -25,9 +25,24 @@
             typedef typename result_of::begin<Seq>::type first_type;
             typedef typename result_of::end<Seq>::type last_type;
 
- typedef iterator_range<first_type, Pos> left_type;
- typedef iterator_range<Pos, last_type> right_type;
- typedef joint_view<left_type, Range> left_insert_type;
+ typedef
+ iterator_range<
+ first_type
+ , typename detail::add_lref<Pos>::type
+ >
+ left_type;
+ typedef
+ iterator_range<
+ typename detail::add_lref<Pos>::type
+ , last_type
+ >
+ right_type;
+ typedef
+ joint_view<
+ left_type
+ , typename detail::add_lref<Range>::type
+ >
+ left_insert_type;
             typedef joint_view<left_insert_type, right_type> type;
         };
     }

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -18,7 +18,12 @@
         template<typename Lhs, typename Rhs>
         struct join
         {
- typedef joint_view<Lhs, Rhs> type;
+ typedef
+ joint_view<
+ typename detail::add_lref<Lhs>::type
+ , typename detail::add_lref<Rhs>::type
+ >
+ type;
         };
     }
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -23,9 +23,7 @@
             typedef
                 iterator_range<
                     typename begin<Seq>::type
- , typename prior<
- typename end<Seq>::type
- >::type
+ , typename prior<typename end<Seq>::type>::type
>
             type;
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -22,9 +22,7 @@
         {
             typedef
                 iterator_range<
- typename next<
- typename begin<Seq>::type
- >::type
+ typename next<typename begin<Seq>::type>::type
                   , typename end<Seq>::type
>
             type;

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -20,12 +20,13 @@
         struct push_back
         {
             typedef
- fusion::single_view<
- typename detail::as_fusion_element<T>::type
+ joint_view<
+ typename detail::add_lref<Seq>::type
+ , fusion::single_view<
+ typename detail::as_fusion_element<T>::type
+ >
>
- single_view;
-
- typedef joint_view<Seq, single_view const> type;
+ type;
         };
     }
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -20,7 +20,10 @@
         struct remove
         {
             typedef
- filter_view<Seq&, mpl::not_<is_same<mpl::_, T> > >
+ filter_view<
+ typename detail::add_lref<Seq>::type
+ , mpl::not_<is_same<mpl::_, T> >
+ >
             type;
         };
     }

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -18,7 +18,12 @@
         template <typename Seq, typename Pred>
         struct remove_if
         {
- typedef filter_view<Seq, mpl::not_<Pred> > type;
+ typedef
+ filter_view<
+ typename detail::add_lref<Seq>::type
+ , mpl::not_<Pred>
+ >
+ type;
         };
     }
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -32,13 +32,7 @@
 
             typedef
                 transform_view<
- //TODO ?!
- typename detail::result_of_forward_as<
- Seq
- , typename add_const<
- typename detail::remove_reference<Seq>::type
- >::type
- >::type
+ typename detail::add_lref<Seq>::type
                   , replacer
>
             type;

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 2009-07-06 17:24:12 EDT (Mon, 06 Jul 2009)
@@ -19,7 +19,13 @@
         template <typename Seq1, typename Seq2, typename F = void_>
         struct transform
         {
- typedef transform_view<Seq1, Seq2, F> type;
+ typedef
+ transform_view<
+ typename detail::add_lref<Seq1>::type
+ , typename detail::add_lref<Seq2>::type
+ , typename detail::add_lref<F>::type
+ >
+ type;
         };
 
         template <typename Seq, typename F>


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