Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54694 - in sandbox/SOC/2009/fusion: boost/fusion/algorithm/query boost/fusion/algorithm/transformation boost/fusion/view/detail boost/fusion/view/transform_view/detail libs/fusion/test/algorithm
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-05 19:14:12


Author: cschmidt
Date: 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
New Revision: 54694
URL: http://svn.boost.org/trac/boost/changeset/54694

Log:
non-const transformation funcs
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp | 5 ++++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp | 8 ++++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp | 17 ++++++++++-------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp | 8 +++-----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp | 4 +++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp | 11 ++++++-----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp | 16 +++++++---------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp | 4 +++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp | 10 ++++++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp | 10 ++++++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp | 16 +++++++++++-----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp | 34 ++++++++++++++++++++++------------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp | 9 +++++----
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp | 12 ++++++------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp | 37 +++++++------------------------------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp | 35 +++--------------------------------
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp | 7 ++++---
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp | 40 ++++++++++++++++++++++++++++++----------
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp | 38 +++++++++++++++++++-------------------
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp | 1 +
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp | 2 +-
   21 files changed, 161 insertions(+), 163 deletions(-)

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -46,7 +46,10 @@
         template <typename Seq, typename T>
         struct find<Seq, T, true>
         {
- typedef detail::assoc_find<Seq, T> filter;
+ typedef
+ detail::assoc_find<typename detail::add_lref<Seq>::type, T>
+ filter;
+
             typedef typename filter::type type;
         };
     }

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -113,10 +113,10 @@
               , First const&
               , Last const&
>
- result_of;
- typedef typename result_of::left_type left_type;
- typedef typename result_of::right_type right_type;
- typedef typename result_of::type result_type;
+ result;
+ typedef typename result::left_type left_type;
+ typedef typename result::right_type right_type;
+ typedef typename result::type result_type;
 
         return result_type(
                 left_type(

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -8,8 +8,8 @@
 #ifndef BOOST_FUSION_ALGORITHM_TRANSFORMATION_ERASE_KEY_HPP
 #define BOOST_FUSION_ALGORITHM_TRANSFORMATION_ERASE_KEY_HPP
 
-#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
 #include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
 #include <boost/fusion/support/ref.hpp>
 
 namespace boost { namespace fusion
@@ -19,7 +19,13 @@
         template <typename Seq, typename Key>
         struct erase_key
         {
- typedef typename detail::assoc_find<Seq, Key> gen;
+ typedef
+ detail::assoc_find<
+ typename detail::add_lref<Seq>::type
+ , Key
+ >
+ gen;
+
             typedef typename
                 erase<
                     Seq
@@ -34,11 +40,8 @@
         result_of::erase_key<BOOST_FUSION_R_ELSE_LREF(Seq), Key>::type
     erase_key(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- typedef typename
- result_of::erase_key<BOOST_FUSION_R_ELSE_LREF(Seq), Key>::gen
- gen;
-
- return erase(BOOST_FUSION_FORWARD(Seq,seq), gen::call(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));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -30,11 +30,9 @@
     inline typename result_of::filter<BOOST_FUSION_R_ELSE_LREF(Seq), T>::type
     filter(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- return
- filter_view<
- BOOST_FUSION_R_ELSE_LREF(Seq)
- , is_same<mpl::_, T>
- >(BOOST_FUSION_FORWARD(Seq,seq));
+ return typename
+ result_of::filter<BOOST_FUSION_R_ELSE_LREF(Seq), T>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -26,7 +26,9 @@
         result_of::filter_if<BOOST_FUSION_R_ELSE_LREF(Seq), Pred>::type
     filter_if(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- return filter_view<BOOST_FUSION_R_ELSE_LREF(Seq), Pred>(seq);
+ return typename
+ result_of::filter_if<BOOST_FUSION_R_ELSE_LREF(Seq), Pred>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -21,10 +21,10 @@
           : insert_range<
                 Seq
               , Pos
- //TODO cschmidt!!!
- , /*BOOST_FUSION_R_ELSE_CLREF(*/
- single_view<typename detail::as_fusion_element<T>::type>//)
- const&
+ //TODO cschmidt!!!
+ , BOOST_FUSION_R_ELSE_CLREF(
+ single_view<typename detail::as_fusion_element<T>::type>)
+
>
         {
         };
@@ -41,7 +41,8 @@
             Pos const& pos,
             BOOST_FUSION_R_ELSE_LREF(T) x)
     {
- return insert_range(BOOST_FUSION_FORWARD(Seq,seq)
+ return insert_range(
+ BOOST_FUSION_FORWARD(Seq,seq)
                 , pos
                 , make_single_view(BOOST_FUSION_FORWARD(T,x)));
     }

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -22,12 +22,11 @@
         template <typename Seq, typename Pos, typename Range>
         struct insert_range
         {
- typedef Pos pos_type;
             typedef typename result_of::begin<Seq>::type first_type;
             typedef typename result_of::end<Seq>::type last_type;
 
- typedef iterator_range<first_type, pos_type> left_type;
- typedef iterator_range<pos_type, last_type> right_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 joint_view<left_insert_type, right_type> type;
         };
@@ -50,13 +49,12 @@
               , Pos const&
               , BOOST_FUSION_R_ELSE_LREF(Range)
>
- result_of;
- typedef typename result_of::left_type left_type;
- typedef typename result_of::right_type right_type;
- typedef typename result_of::left_insert_type left_insert_type;
- typedef typename result_of::type result;
+ result;
+ typedef typename result::left_type left_type;
+ typedef typename result::right_type right_type;
+ typedef typename result::left_insert_type left_insert_type;
 
- return result(
+ return typename result::type(
                 left_insert_type(
                     left_type(
                         fusion::begin(seq),

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -35,7 +35,9 @@
             result_of::join<
                 BOOST_FUSION_R_ELSE_LREF(Lhs)
               , BOOST_FUSION_R_ELSE_LREF(Rhs)
- >::type(lhs,rhs);
+ >::type(
+ BOOST_FUSION_FORWARD(Lhs,lhs)
+ , BOOST_FUSION_FORWARD(Rhs,rhs));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -32,11 +32,13 @@
     }
 
     template <typename Seq>
- inline typename result_of::pop_back<Seq const&>::type
- pop_back(Seq const& seq)
+ inline typename result_of::pop_back<BOOST_FUSION_R_ELSE_LREF(Seq)>::type
+ pop_back(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- typedef typename result_of::pop_back<Seq const&>::type result;
- return result(fusion::begin(seq), fusion::prior(fusion::end(seq)));
+ return typename
+ result_of::pop_back<BOOST_FUSION_R_ELSE_LREF(Seq)>::type(
+ fusion::begin(seq)
+ , fusion::prior(fusion::end(seq)));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -32,11 +32,13 @@
     }
 
     template <typename Seq>
- inline typename result_of::pop_front<Seq const&>::type
- pop_front(Seq const& seq)
+ inline typename result_of::pop_front<BOOST_FUSION_R_ELSE_LREF(Seq)>::type
+ pop_front(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- typedef typename result_of::pop_front<Seq const&>::type result;
- return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
+ return typename
+ result_of::pop_front<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ >::type(fusion::next(fusion::begin(seq)), fusion::end(seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -30,12 +30,18 @@
     }
 
     template <typename Seq, typename T>
- inline typename result_of::push_back<Seq const&, T const&>::type
- push_back(Seq const& seq, T const& x)
+ inline typename
+ result_of::push_back<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ push_back(BOOST_FUSION_R_ELSE_LREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(T) x)
     {
- typedef result_of::push_back<Seq const&, T const&> gen;
-
- return typename gen::type(seq, x);
+ return typename
+ result_of::push_back<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type(BOOST_FUSION_FORWARD(Seq,seq), BOOST_FUSION_FORWARD(T,x));
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -19,23 +19,33 @@
         template <typename Seq, typename T>
         struct push_front
         {
- typedef fusion::single_view<
- typename detail::as_fusion_element<T>::type
- > single_view;
-
- typedef joint_view<single_view const, Seq> type;
+ //TODO cschmidt: move as_fusion_element inside single_view
+ typedef
+ joint_view<
+ fusion::single_view<
+ typename detail::as_fusion_element<T>::type
+ >
+ , typename detail::add_lref<Seq>::type
+ >
+ type;
         };
     }
 
     template <typename Seq, typename T>
- inline typename result_of::push_front<Seq const&, T>::type
- push_front(Seq const& seq, T const& x)
+ inline typename
+ result_of::push_front<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ push_front(
+ BOOST_FUSION_R_ELSE_LREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(T) x)
     {
- typedef typename result_of::push_front<Seq const&, T> push_front;
- typedef typename push_front::single_view single_view;
- typedef typename push_front::type result;
- single_view x_(x);
- return result(x_, seq);
+ return typename
+ result_of::push_front<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type(BOOST_FUSION_FORWARD(T,x), BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -26,11 +26,12 @@
     }
 
     template <typename T, typename Seq>
- inline typename result_of::remove<Seq const&, T>::type
- remove(Seq const& seq)
+ inline typename result_of::remove<BOOST_FUSION_R_ELSE_LREF(Seq), T>::type
+ remove(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- typedef typename result_of::remove<Seq const&, T>::type result_type;
- return result_type(seq);
+ return typename
+ result_of::remove<BOOST_FUSION_R_ELSE_LREF(Seq), T>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -23,13 +23,13 @@
     }
 
     template <typename Pred, typename Seq>
- inline typename result_of::remove_if<Seq const&, Pred>::type
- remove_if(Seq const& seq)
+ inline typename
+ result_of::remove_if<BOOST_FUSION_R_ELSE_LREF(Seq), Pred>::type
+ remove_if(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- typedef typename
- result_of::remove_if<Seq const&, Pred>::type
- result_type;
- return result_type(seq);
+ return typename
+ result_of::remove_if<BOOST_FUSION_R_ELSE_LREF(Seq), Pred>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -39,24 +39,24 @@
     inline typename
         result_of::replace<
             BOOST_FUSION_R_ELSE_LREF(Seq)
- , BOOST_FUSION_R_ELSE_LREF(OldValue)
- , BOOST_FUSION_R_ELSE_LREF(NewValue)
+ , BOOST_FUSION_R_ELSE_CLREF(OldValue)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
>::type
     replace(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
- BOOST_FUSION_R_ELSE_LREF(OldValue) old_value,
- BOOST_FUSION_R_ELSE_LREF(NewValue) new_value)
+ BOOST_FUSION_R_ELSE_CLREF(OldValue) old_value,
+ BOOST_FUSION_R_ELSE_CLREF(NewValue) new_value)
     {
         typedef typename
             result_of::replace<
                 BOOST_FUSION_R_ELSE_LREF(Seq)
- , BOOST_FUSION_R_ELSE_LREF(OldValue)
- , BOOST_FUSION_R_ELSE_LREF(NewValue)
+ , BOOST_FUSION_R_ELSE_CLREF(OldValue)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
>::type
         type;
         typedef
             detail::replacer<
                 typename detail::as_fusion_element<
- BOOST_FUSION_R_ELSE_LREF(OldValue)
+ BOOST_FUSION_R_ELSE_CLREF(OldValue)
>::type
>
         replacer;
@@ -66,29 +66,6 @@
                   , replacer(BOOST_FUSION_FORWARD(OldValue,old_value),0)
                   , BOOST_FUSION_FORWARD(NewValue,new_value));
     }
-
-#ifdef BOOST_NO_RVALUE_REFERENCES
- template <typename Seq, typename OldValue, typename NewValue>
- inline typename result_of::replace<Seq&, T>::type
- replace(Seq& seq,
- OldValue const& old_value,
- NewValue const& new_value)
- {
- typedef typename
- result_of::replace<
- Seq&
- , NewValue const&
- >::type
- type;
- typedef
- detail::replacer<
- typename detail::as_fusion_element<OldValue const&>::type
- >
- replacer;
-
- return replace_if(seq,replacer(old_value,0),new_value);
- }
-#endif
 }}
 
 #endif

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -49,17 +49,17 @@
     inline typename result_of::replace_if<
         BOOST_FUSION_R_ELSE_LREF(Seq)
       , BOOST_FUSION_R_ELSE_LREF(F)
- , BOOST_FUSION_R_ELSE_LREF(NewValue)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
>::type
     replace_if(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
             BOOST_FUSION_R_ELSE_LREF(F) pred,
- BOOST_FUSION_R_ELSE_LREF(NewValue) new_value)
+ BOOST_FUSION_R_ELSE_CLREF(NewValue) new_value)
     {
         typedef typename
             result_of::replace_if<
                 BOOST_FUSION_R_ELSE_LREF(Seq)
               , BOOST_FUSION_R_ELSE_LREF(F)
- , BOOST_FUSION_R_ELSE_LREF(NewValue)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
>
         result;
 
@@ -67,35 +67,6 @@
                 typename result::replacer(BOOST_FUSION_FORWARD(F,pred),
                         BOOST_FUSION_FORWARD(NewValue,new_value)));
     }
-
-#ifdef BOOST_NO_RVALUE_REFERENCES
- template <typename Seq, typename F, typename NewValue>
- inline typename result_of::replace_if<
- Seq&
- , F&
- , NewValue const&
- >::type
- replace_if(Seq& seq,
- F& pred,
- NewValue const& new_value)
- {
- typedef typename
- result_of::replace_if<
- Seq&
- , F&
- , NewValue const&
- >::type
- type;
- typedef
- detail::replacer_if<
- typename detail::as_fusion_element<F&>::type
- , typename detail::as_fusion_element<NewValue const&>::type
- >
- replacer;
-
- return type(seq, replacer(pred, new_value));
- }
-#endif
 }}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -22,10 +22,11 @@
     }
 
     template <typename Seq>
- inline reverse_view<Seq const&>
- reverse(Seq const& view)
+ inline reverse_view<BOOST_FUSION_R_ELSE_LREF(Seq)>
+ reverse(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
- return reverse_view<Seq const&>(view);
+ return reverse_view<BOOST_FUSION_R_ELSE_LREF(Seq)>(
+ BOOST_FUSION_FORWARD(Seq,seq));
     }
 }}
 

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-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -34,21 +34,41 @@
     }
 
     template <typename Seq, typename F>
- inline typename result_of::transform<Seq const&, F>::type
- transform(Seq const& seq, F f)
+ inline typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ >::type
+ transform(BOOST_FUSION_R_ELSE_LREF(Seq) seq, BOOST_FUSION_R_ELSE_LREF(F) f)
     {
- return typename result_of::transform<Seq const&, F>::type(seq, f);
+ return typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_LREF(Seq)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ >::type(BOOST_FUSION_FORWARD(Seq,seq), BOOST_FUSION_FORWARD(F,f));
     }
 
     template <typename Seq1, typename Seq2, typename F>
- inline typename result_of::transform<Seq1 const&, Seq2 const&, F>::type
- transform(Seq1 const& seq1, Seq2 const& seq2, F f)
+ inline typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_LREF(Seq1)
+ , BOOST_FUSION_R_ELSE_LREF(Seq2)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ >::type
+ transform(
+ BOOST_FUSION_R_ELSE_LREF(Seq1) seq1
+ , BOOST_FUSION_R_ELSE_LREF(Seq2) seq2
+ , BOOST_FUSION_R_ELSE_LREF(F) f)
     {
- typedef typename
- result_of::transform<Seq1 const&, Seq2 const&, F>::type
- result;
-
- return result(seq1, seq2, f);
+ return typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_LREF(Seq1)
+ , BOOST_FUSION_R_ELSE_LREF(Seq2)
+ , BOOST_FUSION_R_ELSE_LREF(F)
+ >::type(
+ BOOST_FUSION_FORWARD(Seq1,seq1)
+ , BOOST_FUSION_FORWARD(Seq2,seq2)
+ , BOOST_FUSION_FORWARD(F,f));
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -74,32 +74,32 @@
         }
 
         //TODO cschmidt: volatile?
- typename detail::add_lref<type>::type
- get()
- {
- return get(typename traits::is_view<T>::type());
- }
+ //typename detail::add_lref<type>::type
+ //get()
+ //{
+ // return get(typename traits::is_view<T>::type());
+ //}
 
- typename mpl::if_<traits::is_view<T>, type const&, type>::type
+ typename mpl::if_<traits::is_view<T>, type&, type>::type
         get() const
         {
             return get(typename traits::is_view<T>::type());
         }
 
     private:
- type&
- get(mpl::true_ /*is_view*/)
- {
- return t;
- }
+ //type&
+ //get(mpl::true_ /*is_view*/)
+ //{
+ // return t;
+ //}
+
+ //type
+ //get(mpl::false_ /*is_view*/)
+ //{
+ // return *t;
+ //}
 
- type
- get(mpl::false_ /*is_view*/)
- {
- return *t;
- }
-
- type const&
+ type&
         get(mpl::true_ /*is_view*/)const
         {
             return t;
@@ -112,7 +112,7 @@
         }
 
         typedef typename detail::remove_reference<T>::type non_ref_t;
- typename
+ mutable typename
             mpl::if_<traits::is_view<T>, non_ref_t, non_ref_t*>::type
         t;
     };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -34,6 +34,7 @@
                     detail::remove_reference<ItRef>::type
                 it;
 
+ //TODO: return only const
                 typedef typename
                     mpl::apply<
                         detail::apply_transform_result<

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp 2009-07-05 19:14:09 EDT (Sun, 05 Jul 2009)
@@ -37,9 +37,9 @@
     template <typename T, typename State>
     struct result<add_ints_only(T,State)>
     {
- typedef typename boost::fusion::detail::identity<State>::type type;
         //TODO cschmidt: remove_reference does not support rvalue refs yet,
         //therefore we use the internal function of fusion!
+ typedef typename boost::fusion::detail::identity<State>::type type;
         //typedef typename boost::remove_const<
         // typename boost::remove_reference<State>::type>::type type;
     };


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