Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54655 - in sandbox/SOC/2009/fusion: boost/fusion/adapted/mpl/detail boost/fusion/algorithm/iteration boost/fusion/algorithm/query boost/fusion/algorithm/query/detail boost/fusion/algorithm/transformation boost/fusion/container/generation boost/fusion/container/list boost/fusion/container/list/detail/cons boost/fusion/container/list/detail/list boost/fusion/container/list/detail/list/variadic_templates boost/fusion/container/map boost/fusion/container/map/detail/pp boost/fusion/container/set boost/fusion/container/set/detail/pp boost/fusion/container/vector boost/fusion/container/vector/detail boost/fusion/container/vector/detail/variadic_templates boost/fusion/mpl boost/fusion/mpl/detail boost/fusion/sequence/intrinsic boost/fusion/support boost/fusion/support/detail boost/fusion/support/detail/iterator_adapter boost/fusion/support/detail/pp boost/fusion/view/detail boost/fusion/view/filter_view boost/fusion/view/filter_view/detail boost/fusion/view/iterator_range boost/fusion/view/iterator_range/detail boost/fusion/view/joint_view boost/fusion/view/joint_view/detail boost/fusion/view/reverse_view boost/fusion/view/reverse_view/detail boost/fusion/view/single_view boost/fusion/view/single_view/detail boost/fusion/view/transform_view boost/fusion/view/transform_view/detail boost/fusion/view/zip_view boost/fusion/view/zip_view/detail libs/fusion/example/test libs/fusion/test/sequence
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-04 18:25:11


Author: cschmidt
Date: 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
New Revision: 54655
URL: http://svn.boost.org/trac/boost/changeset/54655

Log:
added inter-it conversion
Added:
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/pp/
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/pp/unknown_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp (contents, props changed)
Removed:
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/is_view.hpp
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/unknown_key.hpp
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl/detail/advance_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp | 20 ++--
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/assoc_find.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp | 14 +-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp | 14 +-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp | 17 ++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp | 14 ++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp | 14 ++-
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp | 85 ++++++++++------------
   sandbox/SOC/2009/fusion/boost/fusion/container/list/cons_iterator.hpp | 103 ++++++++-------------------
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp | 10 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp | 6
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp | 10 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp | 11 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/convert_impl.hpp | 14 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp | 11 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp | 6
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/variadic_templates/as_list_impl.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp | 21 ++--
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/pp/lookup_key.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp | 23 +++--
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/pp/lookup_key.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp | 23 +++--
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/advance_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/next_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/prior_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_impl.hpp | 31 ++++---
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_iterator.hpp | 20 ++++
   sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/at.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp | 6 -
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp | 67 ++++++----------
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/advance_impl.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/deref_impl.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/next_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/prior_impl.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/support/iterator_adapter.hpp | 28 +++++-
   sandbox/SOC/2009/fusion/boost/fusion/support/ref.hpp | 33 ++++++--
   sandbox/SOC/2009/fusion/boost/fusion/support/sequence_assign.hpp | 60 +++------------
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp | 34 ++++++--
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view_iterator.hpp | 15 +++
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp | 15 ++++
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp | 14 ++-
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp | 36 +++++----
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp | 5
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp | 30 +++++--
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp | 54 +++++++++++--
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view_iterator.hpp | 31 ++++++--
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp | 7 +
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp | 10 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp | 11 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp | 12 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp | 57 ++++++++++----
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_iterator.hpp | 42 ++++++++++-
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp | 8 +
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp | 8 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp | 11 +-
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp | 3
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp | 23 +++++
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view_iterator.hpp | 22 ++++-
   sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp | 150 ++++++++++++++++++++++++++-------------
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp | 7 -
   107 files changed, 864 insertions(+), 686 deletions(-)

Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl/detail/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -35,7 +35,7 @@
                type;
 
                 static type
- call(ItRef i)
+ call(ItRef)
                 {
                     return type();
                 }

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -42,7 +42,7 @@
 #ifdef BOOST_NO_RVALUE_REFERENCES
     template <typename Seq, typename State, typename F>
     inline typename result_of::accumulate<
- BOOST_FUSION_R_ELSE_LREF(Sequence)
+ BOOST_FUSION_R_ELSE_LREF(Seq)
       , BOOST_FUSION_R_ELSE_CLREF(State)
       , BOOST_FUSION_R_ELSE_LREF(F)
>::type

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -36,39 +36,39 @@
         {};
     }
 
- template <typename Sequence, typename State, typename F>
+ template <typename Seq, typename State, typename F>
     inline typename result_of::fold<
- BOOST_FUSION_R_ELSE_LREF(Sequence)
+ 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(Sequence) seq,
+ 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(Sequence,seq),
+ BOOST_FUSION_FORWARD(Seq,seq),
                 BOOST_FUSION_FORWARD(State,state),
                 BOOST_FUSION_FORWARD(F,f),
- typename traits::category_of<Sequence>::type());
+ typename traits::category_of<Seq>::type());
     }
 
 #ifdef BOOST_NO_RVALUE_REFERENCES
- template <typename Sequence, typename State, typename F>
+ template <typename Seq, typename State, typename F>
     inline typename result_of::fold<
- BOOST_FUSION_R_ELSE_LREF(Sequence)
+ BOOST_FUSION_R_ELSE_LREF(Seq)
       , BOOST_FUSION_R_ELSE_CLREF(State)
       , BOOST_FUSION_R_ELSE_LREF(F)
>::type
- fold(BOOST_FUSION_R_ELSE_LREF(Sequence) seq,
+ fold(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
          BOOST_FUSION_R_ELSE_CLREF(State) state,
          BOOST_FUSION_R_ELSE_LREF(F) f)
     {
         return detail::fold(
- BOOST_FUSION_FORWARD(Sequence,seq),
+ BOOST_FUSION_FORWARD(Seq,seq),
                 BOOST_FUSION_FORWARD(State,state),
                 BOOST_FUSION_FORWARD(F,f),
- typename traits::category_of<Sequence>::type());
+ typename traits::category_of<Seq>::type());
     }
 #endif
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -19,7 +19,7 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename F>
+ template <typename Seq, typename F>
         struct any
         {
             typedef bool type;

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -18,7 +18,7 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename F>
+ template <typename Seq, typename F>
         struct count
         {
             typedef int type;

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -18,7 +18,7 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename F>
+ template <typename Seq, typename F>
         struct count_if
         {
             typedef int type;

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/assoc_find.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/assoc_find.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/assoc_find.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -28,9 +28,9 @@
         type;
 
         static type
- call(SeqRef s)
+ call(SeqRef seq)
         {
- return s.find_impl(mpl::identity<Key>());
+ return seq.find_impl(mpl::identity<Key>());
         }
     };
 }}}

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -19,7 +19,7 @@
 {
     namespace result_of
     {
- template <typename Sequence>
+ template <typename Seq>
         struct clear
         {
 #ifdef BOOST_NO_VARIADIC_TEMPLATES

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -17,25 +17,25 @@
 {
     namespace result_of
     {
- template <typename Sequence>
+ template <typename Seq>
         struct pop_back
         {
             typedef
                 iterator_range<
- typename begin<Sequence>::type
+ typename begin<Seq>::type
                   , typename prior<
- typename end<Sequence>::type
+ typename end<Seq>::type
>::type
>
             type;
         };
     }
 
- template <typename Sequence>
- inline typename result_of::pop_back<Sequence const>::type
- pop_back(Sequence const& seq)
+ template <typename Seq>
+ inline typename result_of::pop_back<Seq const&>::type
+ pop_back(Seq const& seq)
     {
- typedef typename result_of::pop_back<Sequence const>::type result;
+ typedef typename result_of::pop_back<Seq const&>::type result;
         return result(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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -17,25 +17,25 @@
 {
     namespace result_of
     {
- template <typename Sequence>
+ template <typename Seq>
         struct pop_front
         {
             typedef
                 iterator_range<
                     typename next<
- typename begin<Sequence>::type
+ typename begin<Seq>::type
>::type
- , typename end<Sequence>::type
+ , typename end<Seq>::type
>
             type;
         };
     }
 
- template <typename Sequence>
- inline typename result_of::pop_front<Sequence const>::type
- pop_front(Sequence const& seq)
+ template <typename Seq>
+ inline typename result_of::pop_front<Seq const&>::type
+ pop_front(Seq const& seq)
     {
- typedef typename result_of::pop_front<Sequence const>::type result;
+ typedef typename result_of::pop_front<Seq const&>::type result;
         return result(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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -29,11 +29,11 @@
         };
     }
 
- template <typename Sequence, typename T>
- inline typename result_of::push_back<Sequence const&, T const&>::type
- push_back(Sequence const& seq, T const& x)
+ template <typename Seq, typename T>
+ inline typename result_of::push_back<Seq const&, T const&>::type
+ push_back(Seq const& seq, T const& x)
     {
- typedef typename result_of::push_back<Sequence const&, T const&> gen;
+ typedef result_of::push_back<Seq const&, T const&> gen;
 
         return typename gen::type(seq, 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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -16,19 +16,22 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename T>
+ 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, Sequence> type;
+ typedef fusion::single_view<
+ typename detail::as_fusion_element<T>::type
+ > single_view;
+
+ typedef joint_view<single_view const, Seq> type;
         };
     }
 
- template <typename Sequence, typename T>
- inline typename result_of::push_front<Sequence const, T>::type
- push_front(Sequence const& seq, T const& x)
+ template <typename Seq, typename T>
+ inline typename result_of::push_front<Seq const&, T>::type
+ push_front(Seq const& seq, T const& x)
     {
- typedef typename result_of::push_front<Sequence const, T> push_front;
+ 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);

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -16,18 +16,20 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename T>
+ template <typename Seq, typename T>
         struct remove
         {
- typedef filter_view<Sequence, mpl::not_<is_same<mpl::_, T> > > type;
+ typedef
+ filter_view<Seq&, mpl::not_<is_same<mpl::_, T> > >
+ type;
         };
     }
 
- template <typename T, typename Sequence>
- inline typename result_of::remove<Sequence const, T>::type
- remove(Sequence const& seq)
+ template <typename T, typename Seq>
+ inline typename result_of::remove<Seq const&, T>::type
+ remove(Seq const& seq)
     {
- typedef typename result_of::remove<Sequence const, T>::type result_type;
+ typedef typename result_of::remove<Seq const&, T>::type result_type;
         return result_type(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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -15,19 +15,19 @@
 {
     namespace result_of
     {
- template <typename Sequence, typename Pred>
+ template <typename Seq, typename Pred>
         struct remove_if
         {
- typedef filter_view<Sequence, mpl::not_<Pred> > type;
+ typedef filter_view<Seq, mpl::not_<Pred> > type;
         };
     }
 
- template <typename Pred, typename Sequence>
- inline typename result_of::remove_if<Sequence const, Pred>::type
- remove_if(Sequence const& seq)
+ template <typename Pred, typename Seq>
+ inline typename result_of::remove_if<Seq const&, Pred>::type
+ remove_if(Seq const& seq)
     {
         typedef typename
- result_of::remove_if<Sequence const, Pred>::type
+ result_of::remove_if<Seq const&, Pred>::type
         result_type;
         return result_type(seq);
     }

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -14,18 +14,18 @@
 {
     namespace result_of
     {
- template <typename Sequence>
+ template <typename Seq>
         struct reverse
         {
- typedef reverse_view<Sequence> type;
+ typedef reverse_view<Seq> type;
         };
     }
 
- template <typename Sequence>
- inline reverse_view<Sequence const>
- reverse(Sequence const& view)
+ template <typename Seq>
+ inline reverse_view<Seq const&>
+ reverse(Seq const& view)
     {
- return reverse_view<Sequence const>(view);
+ return reverse_view<Seq const&>(view);
     }
 }}
 

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -24,7 +24,7 @@
 
         template <typename Seq, typename F>
 #if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
- struct transform<Sequence, F, void_>
+ struct transform<Seq, F, void_>
 #else
         struct transform<Seq, F>
 #endif
@@ -40,11 +40,15 @@
         return typename result_of::transform<Seq const&, F>::type(seq, f);
     }
 
- template <typename Sequence1, typename Sequence2, typename F>
- inline typename result_of::transform<Sequence1 const&, Sequence2 const&, F>::type
- transform(Sequence1 const& seq1, Sequence2 const& seq2, 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)
     {
- return typename result_of::transform<Sequence1 const&, Sequence2 const&, F>::type(seq1, seq2, f);
+ typedef typename
+ result_of::transform<Seq1 const&, Seq2 const&, F>::type
+ result;
+
+ return result(seq1, seq2, f);
     }
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -13,7 +13,6 @@
 #include <boost/fusion/adapted/mpl.hpp>
 #include <boost/fusion/container/vector.hpp>
 #include <boost/fusion/container/vector/convert.hpp>
-#include <boost/type_traits/add_reference.hpp>
 #include <boost/preprocessor/repetition/enum.hpp>
 #include <boost/preprocessor/repetition/enum_params.hpp>
 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
@@ -63,7 +62,7 @@
 #endif
         {
             typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences;
- typedef typename mpl::transform<sequences, add_reference<mpl::_> >::type ref_params;
+ typedef typename mpl::transform<sequences, detail::add_lref<mpl::_> >::type ref_params;
             typedef zip_view<typename result_of::as_vector<ref_params>::type> type;
         };
     }

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -38,8 +38,9 @@
     pair_tie(BOOST_FUSION_R_ELSE_LREF(T) t)
     {
         typedef typename
- result_of::pair_tie<Key, BOOST_FUSION_R_ELSE_LREF(Sequence)>::type
+ result_of::pair_tie<Key, BOOST_FUSION_R_ELSE_LREF(T)>::type
         type;
+
         return type(BOOST_FUSION_FORWARD(T,t));
     }
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -25,7 +25,6 @@
 #include <boost/fusion/container/list/detail/cons/value_at_impl.hpp>
 #include <boost/fusion/container/list/detail/cons/empty_impl.hpp>
 
-#include <boost/type_traits/is_convertible.hpp>
 #include <boost/utility/enable_if.hpp>
 #include <boost/mpl/int.hpp>
 #include <boost/mpl/bool.hpp>
@@ -53,11 +52,10 @@
         {}
 
         nil(const nil&)
- {
- }
+ {}
 
- template<typename Sequence>
- nil(detail::sequence_assign_type<Sequence> const volatile&)
+ template<typename Seq>
+ nil(detail::sequence_assign_type<Seq> const volatile&)
         {
             //TODO cschmidt: assert!
         }
@@ -68,24 +66,22 @@
             //TODO cschmidt: assert!
         }
 
- template<typename Iterator>
- nil(detail::assign_by_deref,Iterator const&)
- {
- }
+ template<typename It>
+ nil(detail::assign_by_deref,It const&)
+ {}
 
- template<typename Sequence>
+ template<typename Seq>
         nil&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Sequence))
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq))
         {
             //TODO cschmidt: assert!
             return *this;
         }
 
- template<typename Iterator>
+ template<typename It>
         void
- assign(Iterator const&)
- {
- }
+ assign(It const&)
+ {}
     };
 
     template <typename Car, typename Cdr = nil>
@@ -104,29 +100,28 @@
           , cdr()
         {}
 
- template<typename Cons>
- cons(BOOST_FUSION_R_ELSE_CLREF(Cons) cons_,
- typename enable_if<is_convertible<
- typename detail::remove_reference<Cons>::type*
- , cons const volatile*> >::type* =NULL)
- //cschmidt: iterators so we do not have to deal with the cv-ness
- //of cons_.car/cons_.cdr explicitly
- : car(fusion::front(BOOST_FUSION_FORWARD(Cons,cons_)))
- , cdr(detail::assign_by_deref(),
- fusion::next(
- fusion::begin(BOOST_FUSION_FORWARD(Cons,cons_))))
- {
- }
+ //cschmidt: iterators so we do not have to deal with the cv-ness
+ //of cons_.car/cons_.cdr explicitly
+#define CONS_CTOR(COMBINATION)\
+ cons(cons COMBINATION cons_)\
+ : car(fusion::front(BOOST_FUSION_FORWARD(cons COMBINATION,cons_)))\
+ , cdr(detail::assign_by_deref(),\
+ fusion::next(fusion::begin(\
+ BOOST_FUSION_FORWARD(cons COMBINATION,cons_))))\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(CONS_CTOR);
+
+#undef CONS_CTOR
 
- template<typename SequenceAssign>
- cons(BOOST_FUSION_R_ELSE_CLREF(SequenceAssign) seq,
+ template<typename SeqAssign>
+ cons(BOOST_FUSION_R_ELSE_CLREF(SeqAssign) seq,
              typename enable_if<
- is_sequence_assign<SequenceAssign> >::type* =NULL)
+ is_sequence_assign<SeqAssign> >::type* =NULL)
           : car(fusion::front(seq.get()))
           , cdr(detail::assign_by_deref(),
                   fusion::next(fusion::begin(seq.get())))
- {
- }
+ {}
 
         //cschmidt: rvalue ref if possible, so this does not collide with
         //cons(OtherCar&&,OtherCdr&&)
@@ -135,8 +130,7 @@
              BOOST_FUSION_R_ELSE_CLREF(Iterator) iterator)
           : car(fusion::deref(iterator))
           , cdr(detail::assign_by_deref(),fusion::next(iterator))
- {
- }
+ {}
 
         /*
         template<typename Sequence>
@@ -144,8 +138,7 @@
                                 BOOST_FUSION_R_ELSE_CLREF(Sequence)>::type seq)
           : base(detail::assign_by_deref(),
                  fusion::begin(BOOST_FUSION_FORWARD(Sequence,seq)))
- {
- }
+ {}
         */
 
 #ifdef BOOST_NO_RVALUE_REFERENCES
@@ -160,9 +153,7 @@
 #else
         template<typename OtherCar>
         explicit cons(OtherCar&& other_car,
- typename disable_if<is_convertible<
- typename detail::remove_reference<OtherCar>::type*
- , cons const volatile*> >::type* =NULL)
+ typename disable_if<is_sequence_assign<OtherCar> >::type* =NULL)
           : car(std::forward<OtherCar>(other_car))
           , cdr()
         {}
@@ -174,20 +165,20 @@
         {}
 #endif
 
- template<typename Sequence>
+ template<typename Seq>
         cons&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Sequence) sequence)
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
         {
- assign(fusion::begin(BOOST_FUSION_FORWARD(Sequence,sequence)));
+ assign(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
             return *this;
         }
 
- template<typename Iterator>
+ template<typename It>
         void
- assign(Iterator const& iterator)
+ assign(It const& it)
         {
- car=fusion::deref(iterator);
- cdr.assign(fusion::next(iterator));
+ car=fusion::deref(it);
+ cdr.assign(fusion::next(it));
         }
 
         car_type car;

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/cons_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/cons_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/cons_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -32,11 +32,24 @@
         typedef forward_traversal_tag category;
         typedef Cons cons_type;
 
- explicit cons_iterator(cons_type cons)
- : cons(cons)
+ template<typename OtherIt>
+ cons_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : cons(it.cons)
         {}
 
- cons_type cons;
+ cons_iterator(cons_type cons, int)
+ : cons(&cons)
+ {}
+
+ template<typename OtherIt>
+ cons_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) other_it)
+ {
+ cons=other_it.cons;
+ return *this;
+ }
+
+ typename detail::remove_reference<cons_type>::type* cons;
     };
 
     struct nil_iterator
@@ -46,82 +59,28 @@
         typedef cons_iterator_tag fusion_tag;
         typedef nil cons_type;
 
- nil_iterator() {}
- explicit nil_iterator(nil const&)
- {}
- };
-
- template <>
- struct cons_iterator<nil&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
-
- template <>
- struct cons_iterator<nil const&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
-
- template <>
- struct cons_iterator<nil volatile&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
-
- template <>
- struct cons_iterator<nil const volatile&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
+ nil_iterator()
         {}
- };
 
- template <>
- struct cons_iterator<nil&&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
+ nil_iterator(nil const&,int)
         {}
     };
 
- template <>
- struct cons_iterator<nil const&&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
+#define NIL_ITERATOR(COMBINATION)\
+ template <>\
+ struct cons_iterator<nil COMBINATION>\
+ : nil_iterator\
+ {\
+ cons_iterator()\
+ {}\
+ \
+ explicit cons_iterator(nil COMBINATION, int)\
+ {}\
+ };
 
- template <>
- struct cons_iterator<nil volatile&&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(NIL_ITERATOR)
 
- template <>
- struct cons_iterator<nil const volatile&&>
- : nil_iterator
- {
- cons_iterator() {}
- explicit cons_iterator(nil const&)
- {}
- };
+#undef NIL_ITERATOR
 }}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -84,14 +84,14 @@
         template <>
         struct at_impl<cons_tag>
         {
- template <typename Sequence, typename N>
+ template <typename SeqRef, typename N>
             struct apply
             {
                 typedef typename
- detail::cons_advance<Sequence, N::value>::type
+ detail::cons_advance<SeqRef, N::value>::type
                 element;
                 typedef typename
- detail::result_of_forward_as<Sequence,element>::type
+ detail::result_of_forward_as<SeqRef,element>::type
                 type;
 
                 template <typename Cons, int N2>
@@ -109,9 +109,9 @@
                 }
 
                 static type
- call(Sequence s)
+ call(SeqRef seq)
                 {
- return call(s, mpl::int_<N::value>());
+ return call(seq, mpl::int_<N::value>());
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -24,15 +24,15 @@
         template <>
         struct begin_impl<cons_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
             {
- typedef cons_iterator<Sequence> type;
+ typedef cons_iterator<SeqRef> type;
 
                 static type
- call(Sequence t)
+ call(SeqRef t)
                 {
- return type(t);
+ return type(t,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -25,20 +25,20 @@
         template <>
         struct convert_impl<cons_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
             {
                 typedef
                     detail::build_cons<
- typename result_of::begin<Sequence>::type
- , typename result_of::end<Sequence>::type
+ typename result_of::begin<SeqRef>::type
+ , typename result_of::end<SeqRef>::type
>
                 build_cons;
 
                 typedef typename build_cons::type type;
 
                 static type
- call(Sequence seq)
+ call(SeqRef seq)
                 {
                     return build_cons::call(
                             fusion::begin(seq),

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -38,7 +38,7 @@
                 static type
                 call(Iterator i)
                 {
- return i.cons.car;
+ return i.cons->car;
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -27,9 +27,9 @@
         template <>
         struct empty_impl<cons_tag>
         {
- template <typename Sequence>
+ template <typename Seq>
             struct apply
- : boost::is_same<typename detail::identity<Sequence>::type, nil>
+ : boost::is_same<typename detail::identity<Seq>::type, nil>
             {};
         };
     }

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -29,17 +29,17 @@
         template <>
         struct end_impl<cons_tag>
         {
- template <typename Sequence>
+ template <typename Seq>
             struct apply
             {
                 typedef
                     cons_iterator<
- typename detail::result_of_forward_as<Sequence,nil>::type
+ typename detail::result_of_forward_as<Seq,nil>::type
>
                 type;
 
                 static type
- call(Sequence)
+ call(Seq)
                 {
                     return type();
                 }

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -24,11 +24,11 @@
         template <>
         struct next_impl<cons_iterator_tag>
         {
- template <typename Iterator>
+ template <typename It>
             struct apply
             {
                 typedef typename
- detail::remove_reference<Iterator>::type::cons_type
+ detail::remove_reference<It>::type::cons_type
                 cons_type;
                 typedef typename
                     detail::remove_reference<cons_type>::type::cdr_type
@@ -44,9 +44,9 @@
                 type;
 
                 static type
- call(Iterator i)
+ call(It it)
                 {
- return type(i.cons.cdr);
+ return type(it.cons->cdr,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -22,11 +22,11 @@
         template <>
         struct value_at_impl<cons_tag>
         {
- template <typename Sequence, typename N>
+ template <typename Seq, typename N>
             struct apply
             {
                 typedef typename
- detail::remove_reference<Sequence>::type
+ detail::remove_reference<Seq>::type
                 identity_sequence;
 
                 typedef typename

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -20,13 +20,13 @@
         template <>
         struct at_impl<list_tag>
         {
- template <typename Sequence, typename N>
+ template <typename SeqRef, typename N>
             struct apply
             {
                 typedef typename
                     detail::result_of_forward_as<
- Sequence
- , typename detail::remove_reference<Sequence>::type::storage_type
+ SeqRef
+ , typename detail::remove_reference<SeqRef>::type::storage_type
>::type
                 storage_type;
 
@@ -35,10 +35,10 @@
                 type;
 
                 static type
- call(Sequence s)
+ call(SeqRef seq)
                 {
                     return fusion::at<N>(
- static_cast<storage_type&>(s.get_data()));
+ static_cast<storage_type&>(seq.get_data()));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -24,12 +24,12 @@
         template <>
         struct begin_impl<list_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
             {
                 typedef typename
- detail::result_of_forward_as<Sequence
- , typename detail::remove_reference<Sequence>::type::storage_type
+ detail::result_of_forward_as<SeqRef
+ , typename detail::remove_reference<SeqRef>::type::storage_type
>::type
                 storage_type;
 
@@ -41,10 +41,9 @@
                 type;
 
                 static type
- call(Sequence s)
+ call(SeqRef seq)
                 {
- return fusion::begin(
- static_cast<storage_type>(s.get_data()));
+ return type(fusion::begin(seq.get_data()),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/convert_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/convert_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/convert_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -26,27 +26,27 @@
         template <>
         struct convert_impl<list_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
             {
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
                 typedef typename
- detail::as_list<result_of::size<Sequence>::value>
+ detail::as_list<result_of::size<Seq>::value>
                 gen;
                 typedef typename gen::template apply<
- typename result_of::begin<Sequence>::type>::type
+ typename result_of::begin<Seq>::type>::type
                 type;
 
- static type call(Sequence seq)
+ static type call(SeqRef seq)
                 {
                     return gen::call(
- fusion::begin(BOOST_FUSION_FORWARD(Sequence,seq)));
+ fusion::begin(BOOST_FUSION_FORWARD(SeqRef,seq)));
                 }
 #else
- typedef typename detail::as_list_impl<Sequence> gen;
+ typedef typename detail::as_list_impl<SeqRef> gen;
                 typedef typename gen::apply::type type;
 
- static type call(Sequence seq)
+ static type call(SeqRef seq)
                 {
                     return gen::call(seq);
                 }

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -24,12 +24,12 @@
         template <>
         struct end_impl<list_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
             {
                 typedef typename
- detail::result_of_forward_as<Sequence
- , typename detail::remove_reference<Sequence>::type::storage_type
+ detail::result_of_forward_as<SeqRef
+ , typename detail::remove_reference<SeqRef>::type::storage_type
>::type
                 storage_type;
 
@@ -41,10 +41,9 @@
                 type;
 
                 static type
- call(Sequence s)
+ call(SeqRef seq)
                 {
- return fusion::end(
- static_cast<storage_type>(s.get_data()));
+ return type(fusion::end(seq.get_data()),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -20,13 +20,13 @@
         template <>
         struct value_at_impl<list_tag>
         {
- template <typename Sequence, typename N>
+ template <typename SeqRef, typename N>
             struct apply
             {
                 typedef typename
                     detail::result_of_forward_as<
- Sequence
- , typename detail::remove_reference<Sequence>::type::storage_type
+ SeqRef
+ , typename detail::remove_reference<SeqRef>::type::storage_type
>::type
                 storage_type;
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/variadic_templates/as_list_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/variadic_templates/as_list_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/variadic_templates/as_list_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -16,7 +16,7 @@
 
 namespace boost { namespace fusion { namespace detail
 {
- template<typename Sequence>
+ template<typename SeqRef>
     struct as_list_impl
     {
         struct apply
@@ -25,17 +25,17 @@
                 mpl::apply<
                     mpl::unpack_args<variadic_quote<list> >
                   , typename detail::to_random_access_mpl_seq<
- typename detail::remove_reference<Sequence>::type
+ typename detail::remove_reference<SeqRef>::type
>::type
>::type
             type;
         };
 
         static typename apply::type
- call(Sequence sequence)
+ call(SeqRef seq)
         {
             return typename apply::type(
- sequence_assign(BOOST_FUSION_FORWARD(Sequence,sequence)));
+ sequence_assign(BOOST_FUSION_FORWARD(SeqRef,seq)));
         }
     };
 }}}

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -14,8 +14,6 @@
 #include <boost/fusion/support/sequence_base.hpp>
 #include <boost/fusion/support/ref.hpp>
 
-#include <boost/type_traits/is_convertible.hpp>
-
 #include <boost/fusion/container/list/detail/list/begin_impl.hpp>
 #include <boost/fusion/container/list/detail/list/end_impl.hpp>
 #include <boost/fusion/container/list/detail/list/at_impl.hpp>
@@ -46,26 +44,27 @@
           : data()
         {}
 
- template<typename List>
- list(BOOST_FUSION_R_ELSE_CLREF(List) list_,
- typename enable_if<is_convertible<
- typename detail::remove_reference<List>::type*
- , list const volatile*> >::type* =NULL)
- : data(BOOST_FUSION_FORWARD(List,list_).data)
- {
+#define LIST_CTOR(COMBINATION)\
+ list(list COMBINATION list_)\
+ : data(BOOST_FUSION_FORWARD(list COMBINATION,list_).data)\
+ {\
         }
 
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(LIST_CTOR)
+
+#undef LIST_CTOR
+
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
         template <typename Arg>
         list(BOOST_FUSION_R_ELSE_CLREF(Arg) arg)
- : data(BOOST_FUSION_FORWARD(Arg,arg))
+ : data(BOOST_FUSION_FORWARD(Arg,arg))
         {}
 
 # include <boost/fusion/container/list/detail/list/pp/list_forward_ctor.hpp>
 #else
         template <typename... OtherArguments>
         list(BOOST_FUSION_R_ELSE_CLREF(OtherArguments)... other_arguments)
- : data(BOOST_FUSION_FORWARD(OtherArguments,other_arguments)...)
+ : data(BOOST_FUSION_FORWARD(OtherArguments,other_arguments)...)
         {}
 #endif
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/pp/lookup_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/pp/lookup_key.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/pp/lookup_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -10,7 +10,7 @@
 
 #include <boost/type_traits/add_const.hpp>
 #include <boost/type_traits/add_reference.hpp>
-#include <boost/fusion/support/detail/unknown_key.hpp>
+#include <boost/fusion/support/detail/pp/unknown_key.hpp>
 
 namespace boost { namespace fusion
 {

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -132,15 +132,16 @@
         map()
             : data() {}
 
- template<typename Map>
- map(BOOST_FUSION_R_ELSE_CLREF(Map) map_,
- typename enable_if<is_convertible<
- typename detail::remove_reference<Map>::type*
- , map const volatile*> >::type* =NULL)
- : data(BOOST_FUSION_FORWARD(Map,map_).data)
- {
+#define MAP_CTOR(COMBINATION)\
+ map(map COMBINATION map_)\
+ : data(BOOST_FUSION_FORWARD(map COMBINATION,map_).data)\
+ {\
         }
 
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MAP_CTOR)
+
+#undef MAP_CTOR
+
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
         template <typename Arg>
         map(BOOST_FUSION_R_ELSE_CLREF(Arg) arg)
@@ -169,18 +170,18 @@
         typename meta_find_impl_const<Key>::type
         find_impl(mpl::identity<Key>) const
         {
- return typename meta_find_impl_const<Key>::type(data);
+ return typename meta_find_impl_const<Key>::type(data,0);
         }
 
         template <typename Key>
         typename meta_find_impl<Key>::type
         find_impl(mpl::identity<Key>)
         {
- return typename meta_find_impl<Key>::type(data);
+ return typename meta_find_impl<Key>::type(data,0);
         }
 
         template <class Key>
- typename add_reference<typename meta_at_impl<Key>::type>::type
+ typename detail::add_lref<typename meta_at_impl<Key>::type>::type
         at_impl(mpl::identity<Key>)
         {
             return data.at_impl(
@@ -188,7 +189,7 @@
         }
 
         template <class Key>
- typename add_reference<
+ typename detail::add_lref<
             typename add_const<typename meta_at_impl<Key>::type>::type
>::type
         at_impl(mpl::identity<Key>) const

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/pp/lookup_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/pp/lookup_key.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/pp/lookup_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -8,7 +8,7 @@
 #ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_PP_LOOKUP_KEY_HPP
 #define BOOST_FUSION_CONTAINER_SET_DETAIL_PP_LOOKUP_KEY_HPP
 
-#include <boost/fusion/support/detail/unknown_key.hpp>
+#include <boost/fusion/support/detail/pp/unknown_key.hpp>
 
 namespace boost { namespace fusion { namespace detail
 {

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -106,15 +106,16 @@
         set()
             : data() {}
 
- template<typename Set>
- set(BOOST_FUSION_R_ELSE_CLREF(Set) set_,
- typename enable_if<is_convertible<
- typename detail::remove_reference<Set>::type*
- , set const volatile*> >::type* =NULL)
- : data(BOOST_FUSION_FORWARD(Set,set_).data)
- {
+#define SET_CTOR(COMBINATION)\
+ set(set COMBINATION set_)\
+ : data(BOOST_FUSION_FORWARD(set COMBINATION,set_).data)\
+ {\
         }
 
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(SET_CTOR)
+
+#undef SET_CTOR
+
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
         template <typename Arg>
         set(BOOST_FUSION_R_ELSE_CLREF(Arg) arg)
@@ -143,25 +144,25 @@
         typename meta_find_impl_const<Key>::type
         find_impl(mpl::identity<Key>) const
         {
- return typename meta_find_impl_const<Key>::type(data);
+ return typename meta_find_impl_const<Key>::type(data,0);
         }
 
         template <typename Key>
         typename meta_find_impl<Key>::type
         find_impl(mpl::identity<Key>)
         {
- return typename meta_find_impl<Key>::type(data);
+ return typename meta_find_impl<Key>::type(data,0);
         }
 
         template <class Key>
- typename add_reference<Key>::type
+ typename detail::add_lref<Key>::type
         at_impl(mpl::identity<Key>)
         {
             return data.at_impl(typename meta_find_impl<Key>::type::index());
         }
 
         template <class Key>
- typename add_reference<typename add_const<Key>::type>::type
+ typename detail::add_lref<typename add_const<Key>::type>::type
         at_impl(mpl::identity<Key>) const
         {
             return data.at_impl(

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -36,7 +36,7 @@
                 static type
                 call(Iterator i)
                 {
- return type(BOOST_FUSION_FORWARD(vector,i.vec));
+ return type(*i.vec,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -26,7 +26,7 @@
                 static type
                 call(Sequence v)
                 {
- return type(BOOST_FUSION_FORWARD(Sequence,v));
+ return type(BOOST_FUSION_FORWARD(Sequence,v),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -44,7 +44,7 @@
                 static type
                 call(Iterator i)
                 {
- return i.vec.at_impl(index());
+ return i.vec->at_impl(index());
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -29,7 +29,7 @@
                 static type
                 call(Sequence v)
                 {
- return type(BOOST_FUSION_FORWARD(Sequence,v));
+ return type(BOOST_FUSION_FORWARD(Sequence,v),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -37,7 +37,7 @@
                 static type
                 call(Iterator i)
                 {
- return type(i.vec);
+ return type(*i.vec,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/prior_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -36,7 +36,7 @@
                 static type
                 call(Iterator i)
                 {
- return type(BOOST_FUSION_FORWARD(vector,i.vec));
+ return type(*i.vec,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -15,8 +15,6 @@
 #include <boost/fusion/support/assign_tags.hpp>
 
 #include <boost/mpl/int.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
 
 #include <utility>
 
@@ -120,13 +118,13 @@
             }
 #endif
 
- typename add_reference<Head>::type
+ typename detail::add_lref<Head>::type
             at_impl(mpl::int_<Index>)
             {
                 return _element;
             }
 
- typename add_reference<typename add_const<Head>::type>::type
+ typename detail::add_lref<typename add_const<Head>::type>::type
             at_impl(mpl::int_<Index>)const
             {
                 return _element;
@@ -154,16 +152,17 @@
         {
         }
 
- template<typename Vec>
- vector(BOOST_FUSION_R_ELSE_CLREF(Vec) vec,
- typename enable_if<is_convertible<
- typename detail::remove_reference<Vec>::type*
- , vector const volatile*> >::type* =NULL)
- : base(detail::assign_by_deref(),
- fusion::begin(BOOST_FUSION_FORWARD(Vec,vec)))
- {
+#define VECTOR_CTOR(COMBINATION)\
+ vector(vector COMBINATION vec)\
+ : base(detail::assign_by_deref(),\
+ fusion::begin(BOOST_FUSION_FORWARD(vector COMBINATION,vec)))\
+ {\
         }
 
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(VECTOR_CTOR)
+
+#undef VECTOR_CTOR
+
         template<typename SequenceAssign>
         vector(BOOST_FUSION_R_ELSE_CLREF(SequenceAssign) seq,
                typename enable_if<
@@ -208,14 +207,18 @@
         }
 
         template<typename I>
- typename mpl::at<types, I>::type&
+ typename detail::add_lref<
+ typename mpl::at<types, I>::type
+ >::type
         at_impl(I)
         {
             return base::at_impl(mpl::int_<I::value>());
         }
 
         template<typename I>
- typename add_const<typename mpl::at<types, I>::type>::type&
+ typename detail::add_lref<
+ typename add_const<typename mpl::at<types, I>::type>::type
+ >::type
         at_impl(I) const
         {
             return base::at_impl(mpl::int_<I::value>());

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -91,7 +91,7 @@
         }
 
         template <int N>
- typename add_reference<
+ typename detail::add_lref<
             typename mpl::at_c<types, N>::type
>::type
         at_impl(mpl::int_<N> index)
@@ -100,7 +100,7 @@
         }
 
         template <int N>
- typename add_reference<
+ typename detail::add_lref<
             typename add_const<
                 typename mpl::at_c<types, N>::type
>::type
@@ -111,7 +111,7 @@
         }
 
         template <typename I>
- typename add_reference<
+ typename detail::add_lref<
             typename mpl::at<types, I>::type
>::type
         at_impl(I index)
@@ -120,7 +120,7 @@
         }
 
         template<typename I>
- typename add_reference<
+ typename detail::add_lref<
             typename add_const<
                 typename mpl::at<types, I>::type
>::type

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -31,6 +31,7 @@
     template <typename Vector, int N>
     struct vector_iterator_identity;
 
+ //TODO VecRef!
     template <typename Vector, int N>
     struct vector_iterator
       : iterator_base<vector_iterator<Vector, N> >
@@ -45,11 +46,24 @@
               , N>
         identity;
 
- explicit vector_iterator(Vector vec)
- : vec(vec)
+ template<typename OtherVecIt>
+ vector_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherVecIt) it)
+ : vec(it.vec)
         {}
 
- Vector vec;
+ vector_iterator(Vector vec, int)
+ : vec(&vec)
+ {}
+
+ template<typename OtherVecIt>
+ vector_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherVecIt) it)
+ {
+ vec=it.vec;
+ return *this;
+ }
+
+ typename detail::remove_reference<Vector>::type* vec;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -21,11 +21,11 @@
     template <>
     struct back_impl<fusion::fusion_sequence_tag>
     {
- template <typename Sequence>
+ template <typename SeqRef>
         struct apply
           : fusion::result_of::value_of<
                 typename fusion::result_of::prior<
- typename fusion::result_of::end<Sequence>::type
+ typename fusion::result_of::end<SeqRef>::type
>::type
>
         {};

Modified: sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/at.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/at.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/detail/at.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -25,9 +25,9 @@
         template <>
         struct at_impl<fusion::fusion_sequence_tag>
         {
- template <typename Sequence, typename N>
+ template <typename SeqRef, typename N>
             struct apply
- : fusion::result_of::value_at<Sequence, N>
+ : fusion::result_of::value_at<SeqRef, N>
             {};
         };
     }

Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -22,11 +22,7 @@
     namespace extension
     {
         template <typename Tag>
- struct at_impl
- {
- template <typename Sequence, typename N>
- struct apply;
- };
+ struct at_impl;
 
         template <>
         struct at_impl<sequence_facade_tag>

Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -21,11 +21,7 @@
     namespace extension
     {
         template <typename Tag>
- struct at_key_impl
- {
- template <typename Sequence, typename Key>
- struct apply;
- };
+ struct at_key_impl;
 
         template <>
         struct at_key_impl<sequence_facade_tag>

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 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -19,11 +19,7 @@
     namespace extension
     {
         template <typename Tag>
- struct begin_impl
- {
- template <typename Sequence>
- struct apply;
- };
+ struct begin_impl;
 
         template <>
         struct begin_impl<sequence_facade_tag>

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 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -19,11 +19,7 @@
     namespace extension
     {
         template <typename Tag>
- struct end_impl
- {
- template <typename Sequence>
- struct apply;
- };
+ struct end_impl;
 
         template <>
         struct end_impl<sequence_facade_tag>

Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -21,11 +21,7 @@
     namespace extension
     {
         template <typename Tag>
- struct value_at_impl
- {
- template <typename Sequence, typename N>
- struct apply;
- };
+ struct value_at_impl;
 
         template <>
         struct value_at_impl<sequence_facade_tag>

Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -22,11 +22,7 @@
     namespace extension
     {
         template <typename Tag>
- struct value_at_key_impl
- {
- template <typename Sequence, typename Key>
- struct apply;
- };
+ struct value_at_key_impl;
 
         template <>
         struct value_at_key_impl<sequence_facade_tag>

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -11,9 +11,13 @@
 
 //TODO cschmidt: rref
 
-#include <boost/ref.hpp>
 #include <boost/fusion/support/ref.hpp>
 
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/ref.hpp>
+
 namespace boost { namespace fusion { namespace detail
 {
     template <typename T>
@@ -22,31 +26,15 @@
         typedef T type;
     };
 
- template <typename T>
- struct as_fusion_element<T&>
- : as_fusion_element<T>
- {
- };
+#define CV_REF_SPECIALISATION(COMBINATION)\
+ template <typename T>\
+ struct as_fusion_element<T COMBINATION>\
+ : as_fusion_element<T>\
+ {};
 
- template <typename T>
- struct as_fusion_element<const T&>
- : as_fusion_element<T>
- {
- };
-
-#ifndef BOOST_NO_RVALUE_REFERENCES
- template <typename T>
- struct as_fusion_element<T&&>
- : as_fusion_element<T>
- {
- };
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(CV_REF_SPECIALISATION)
 
- template <typename T>
- struct as_fusion_element<const T&&>
- : as_fusion_element<T>
- {
- };
-#endif
+#undef CV_REF_SPECIALISATION
 
     template <typename T>
     struct as_fusion_element<reference_wrapper<T> >
@@ -55,7 +43,7 @@
     };
 
     template <typename T>
- struct as_fusion_element<const reference_wrapper<T> >
+ struct as_fusion_element<reference_wrapper<T> const>
     {
         typedef T& type;
     };
@@ -63,40 +51,37 @@
     template <typename T, int N>
     struct as_fusion_element<T[N]>
     {
- typedef const T(&type)[N];
+ typedef const typename as_fusion_element<T>::type(&type)[N];
     };
 
     template <typename T, int N>
     struct as_fusion_element<volatile T[N]>
     {
- typedef const volatile T(&type)[N];
+ typedef const volatile typename as_fusion_element<T>::type(&type)[N];
     };
 
     template <typename T, int N>
     struct as_fusion_element<const volatile T[N]>
     {
- typedef const volatile T(&type)[N];
+ typedef const volatile typename as_fusion_element<T>::type(&type)[N];
     };
 
     template <typename T>
     struct as_fusion_element_lref
     {
+ typedef typename as_fusion_element<T>::type element;
+
         typedef typename
- add_lref<typename as_fusion_element<T>::type>::type
+ mpl::if_<
+ mpl::and_<
+ is_lrref<T>
+ , is_same<typename identity<T>::type,element>
+ >
+ , T
+ , typename add_lref<element>::type
+ >::type
         type;
     };
-
- template <typename T>
- struct as_fusion_element_lref<const T&>
- : as_fusion_element_lref<const T>
- {
- };
-
- template <typename T>
- struct as_fusion_element_lref<const T&&>
- : as_fusion_element_lref<const T>
- {
- };
 }}}
 
 #endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/support/detail/is_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/is_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
+++ (empty file)
@@ -1,20 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2006 Joel de Guzman
-
- 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_SUPPORT_DETAIL_IS_VIEW_HPP
-#define BOOST_FUSION_SUPPORT_DETAIL_IS_VIEW_HPP
-
-namespace boost { namespace fusion { namespace detail
-{
- template <typename T>
- struct fusion_is_view
- {
- typedef typename detail::remove_reference<T>::type::is_view type;
- };
-}}}
-
-#endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -48,8 +48,7 @@
                 static type
                 call(Iterator i)
                 {
- return fusion::advance<N>(
- static_cast<iterator_type>(i.iterator));
+ return type(fusion::advance<N>(i.it),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -37,8 +37,7 @@
                 static type
                 call(Iterator i)
                 {
- return fusion::deref(
- static_cast<iterator_type>(i.iterator));
+ return fusion::deref(i.it);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,7 +46,7 @@
                 static type
                 call(Iterator i)
                 {
- return fusion::next(static_cast<iterator_type>(i.iterator));
+ return type(fusion::next(i.it),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/iterator_adapter/prior_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,8 +46,7 @@
                 static type
                 call(Iterator i)
                 {
- return fusion::prior(
- static_cast<iterator_type>(i.iterator));
+ return type(fusion::prior(i.it),0);
                 }
             };
         };

Added: sandbox/SOC/2009/fusion/boost/fusion/support/detail/pp/unknown_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/pp/unknown_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_SUPPORT_DETAIL_PP_UNKNOWN_KEY_HPP
+#define BOOST_FUSION_SUPPORT_DETAIL_PP_UNKNOWN_KEY_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int index>
+ struct unknown_key {};
+}}}
+
+#endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/support/detail/unknown_key.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/unknown_key.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
+++ (empty file)
@@ -1,17 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2006 Joel de Guzman
-
- 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_SUPPORT_DETAIL_UNKNOWN_KEY_HPP
-#define BOOST_FUSION_SUPPORT_DETAIL_UNKNOWN_KEY_HPP
-
-namespace boost { namespace fusion { namespace detail
-{
- template <int index>
- struct unknown_key {};
-}}}
-
-#endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -22,20 +22,22 @@
         template<typename Tag>
         struct is_view_impl
         {
- template <typename T>
+ template <typename SeqRef>
             struct apply
- : detail::fusion_is_view<T>
+ : detail::remove_reference<SeqRef>::type::is_view
             {};
         };
 
+ /*
         template <>
         struct is_view_impl<sequence_facade_tag>
         {
- template <typename Sequence>
+ template <typename SeqRef>
             struct apply
- : detail::remove_reference<Sequence>::type::is_view
+ : detail::remove_reference<SeqRef>::type::is_view
             {};
         };
+ */
     }
 
     namespace traits
@@ -43,7 +45,7 @@
         template <typename T>
         struct is_view :
             extension::is_view_impl<typename fusion::traits::tag_of<T>::type>::
- template apply<T>::type
+ template apply<typename detail::add_lref<T>::type>::type
         {};
     }
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/iterator_adapter.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/iterator_adapter.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/iterator_adapter.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -9,7 +9,6 @@
 #include <boost/fusion/support/ref.hpp>
 #include <boost/fusion/support/iterator_base.hpp>
 
-
 #include <boost/fusion/support/detail/iterator_adapter/deref_impl.hpp>
 #include <boost/fusion/support/detail/iterator_adapter/value_of_impl.hpp>
 #include <boost/fusion/support/detail/iterator_adapter/next_impl.hpp>
@@ -22,17 +21,32 @@
 {
     struct iterator_adapter_tag;
 
- template<typename Iterator, typename NewCategory>
+ template<typename It, typename NewCategory>
     struct iterator_adapter
- : iterator_base<iterator_adapter<Iterator, NewCategory> >
+ : iterator_base<iterator_adapter<It, NewCategory> >
     {
         typedef iterator_adapter_tag fusion_tag;
         typedef NewCategory category;
- typedef Iterator iterator_type;
+ typedef It iterator_type;
+
+ template<typename OtherIt>
+ iterator_adapter(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : it(it.it)
+ {}
+
+ iterator_adapter(It const& it, int)
+ : it(it)
+ {}
+
+ template<typename OtherIt>
+ iterator_adapter&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) other_it)
+ {
+ it=other_it.it;
+ return *this;
+ }
 
- iterator_adapter(Iterator iterator)
- : iterator(BOOST_FUSION_FORWARD(Iterator,iterator)) {}
- Iterator iterator;
+ It it;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/ref.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/ref.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/ref.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -37,6 +37,12 @@
 # define BOOST_FUSION_OBJ_ELSE_CLREF(OBJECT) OBJECT const&
 
 # define BOOST_FUSION_FORWARD(TYPE,ARGUMENT) ARGUMENT
+
+# define BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO)\
+ MACRO(&)\
+ MACRO(const &)\
+ MACRO(volatile&)\
+ MACRO(const volatile&)
 #else
 # include <utility>
 
@@ -47,6 +53,19 @@
 # define BOOST_FUSION_OBJ_ELSE_CLREF(OBJECT) OBJECT
 
 # define BOOST_FUSION_FORWARD(TYPE,ARGUMENT) std::forward<TYPE>(ARGUMENT)
+
+ //cschmidt: This macro could be workaround with a single function using
+ //enable if and is_convertible. This is a lot slower than five overloads/
+ //specialisations though.
+# define BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO)\
+ MACRO(&)\
+ MACRO(const&)\
+ MACRO(volatile&)\
+ MACRO(const volatile&)\
+ MACRO(&&)\
+ MACRO(const&&)\
+ MACRO(volatile&&)\
+ MACRO(const volatile&&)
 #endif
 
 namespace boost { namespace fusion { namespace detail
@@ -151,13 +170,6 @@
>::type&
         type;
     };
-
- /*template <typename,typename Type>
- Type
- forward_as(Type type)
- {
- return type;
- }*/
 #else
     template <typename TestType,typename Type>
     struct result_of_forward_as
@@ -178,9 +190,10 @@
                          //rvalue refs!
                        , mpl::not_<is_rref<TestType> >
>,
- mpl::if_<is_rref<TestType>
- , real_type&&
- , real_type&
+ mpl::eval_if<
+ is_rref<TestType>
+ , mpl::identity<real_type&&>
+ , detail::add_lref<real_type>
>,
                 mpl::identity<real_type>
>::type

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/sequence_assign.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/sequence_assign.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/sequence_assign.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -9,6 +9,7 @@
 #include <boost/fusion/support/ref.hpp>
 
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
 
 namespace boost{namespace fusion{
 
@@ -44,62 +45,27 @@
     {
     };
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> const&>
- : mpl::true_
- {
+# define IS_SEQUENCE_ASSIGN(COMBINATION)\
+ template<typename Seq>\
+ struct is_sequence_assign<detail::sequence_assign_type<Seq> COMBINATION>\
+ : mpl::true_\
+ {\
     };
 
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> const volatile&>
- : mpl::true_
- {
- };
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(IS_SEQUENCE_ASSIGN);
 
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> volatile&>
- : mpl::true_
- {
- };
+# undef IS_SEQUENCE_ASSIGN
 
     template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq>&>
- : mpl::true_
- {
- };
-
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> const&&>
- : mpl::true_
- {
- };
-
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> const volatile&&>
- : mpl::true_
- {
- };
-
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq> volatile&&>
- : mpl::true_
- {
- };
-
- template<typename Seq>
- struct is_sequence_assign<detail::sequence_assign_type<Seq>&&>
- : mpl::true_
- {
- };
-
- template<typename Seq>
- detail::sequence_assign_type<BOOST_FUSION_R_ELSE_LREF(Seq)>
+ typename mpl::if_<
+ is_sequence_assign<BOOST_FUSION_R_ELSE_LREF(Seq)>
+ , BOOST_FUSION_R_ELSE_LREF(Seq)
+ , detail::sequence_assign_type<BOOST_FUSION_R_ELSE_LREF(Seq)>
+ >::type
     sequence_assign(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
     {
         return seq;
     }
-#endif
 }}
 
 #endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -0,0 +1,121 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#ifndef BOOST_FUSION_VIEW_DETAIL_VIEW_STORAGE_HPP
+#define BOOST_FUSION_VIEW_DETAIL_VIEW_STORAGE_HPP
+
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/ref.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename T>
+ struct view_storage
+ {
+ private:
+ template<typename OtherT>
+ static typename
+ enable_if<
+ traits::is_view<T>
+ , BOOST_FUSION_R_ELSE_LREF(OtherT)
+ >::type
+ get_init_type(BOOST_FUSION_R_ELSE_LREF(OtherT) other_t)
+ {
+ return other_t;
+ }
+
+ template<typename OtherT>
+ static typename
+ disable_if<
+ traits::is_view<T>
+ , typename detail::remove_reference<OtherT>::type*
+ >::type
+ get_init_type(BOOST_FUSION_R_ELSE_LREF(OtherT) other_t)
+ {
+ return &other_t;
+ }
+
+ public:
+ typedef typename
+ mpl::if_<
+ traits::is_view<T>
+ , typename detail::remove_reference<T>::type
+ , typename detail::add_lref<T>::type
+ >::type
+ type;
+
+#define VIEW_STORAGE_CTOR(COMBINATION)\
+ template<typename OtherT>\
+ view_storage(view_storage<OtherT> COMBINATION storage)\
+ : t(get_init_type(storage.get()))\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(VIEW_STORAGE_CTOR)
+
+#undef VIEW_STORAGE_CTOR
+
+ template<typename OtherT>
+ view_storage(BOOST_FUSION_R_ELSE_LREF(OtherT) other_t)
+ : t(get_init_type(BOOST_FUSION_FORWARD(OtherT,other_t)))
+ {}
+
+ template<typename OtherViewStorage>
+ view_storage&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherViewStorage) other_storage)
+ {
+ t=BOOST_FUSION_FORWARD(OtherViewStorage,other_storage).t;
+ return *this;
+ }
+
+ //TODO cschmidt: volatile?
+ 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
+ get() const
+ {
+ return get(typename traits::is_view<T>::type());
+ }
+
+ private:
+ type&
+ get(mpl::true_ /*is_view*/)
+ {
+ return t;
+ }
+
+ type
+ get(mpl::false_ /*is_view*/)
+ {
+ return *t;
+ }
+
+ type const&
+ get(mpl::true_ /*is_view*/)const
+ {
+ return t;
+ }
+
+ type
+ get(mpl::false_ /*is_view*/)const
+ {
+ return *t;
+ }
+
+ typedef typename detail::remove_reference<T>::type non_ref_t;
+ typename
+ mpl::if_<traits::is_view<T>, non_ref_t, non_ref_t*>::type
+ t;
+ };
+}}}
+
+#endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,9 +46,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::begin(s.seq));
+ return type(fusion::begin(seq.seq.get()),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -45,9 +45,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::end(s.seq));
+ return type(fusion::end(seq.seq.get()),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -49,9 +49,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(filter::call(i.first));
+ return type(filter::call(it.first),0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -8,11 +8,13 @@
 #ifndef BOOST_FUSION_VIEW_FILTER_VIEW_FILTER_VIEW_HPP
 #define BOOST_FUSION_VIEW_FILTER_VIEW_FILTER_VIEW_HPP
 
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/fusion/support/ref.hpp>
 #include <boost/fusion/support/sequence_base.hpp>
 #include <boost/fusion/support/is_view.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+
 #include <boost/mpl/bool.hpp>
 
 #include <boost/fusion/view/filter_view/filter_view_iterator.hpp>
@@ -35,21 +37,33 @@
         typedef forward_traversal_tag category;
         typedef mpl::true_ is_view;
 
- typedef typename
- mpl::if_<
- traits::is_view<Seq>
- , typename detail::identity<Seq>::type
- , typename detail::add_lref<Seq>::type
- >::type
- seq_type;
+ typedef typename detail::view_storage<Seq>::type seq_type;
         typedef Pred pred_type;
 
+#define FILTER_VIEW_CTOR(COMBINATION)\
+ template<typename OtherSeq>\
+ filter_view(filter_view<OtherSeq, Pred> COMBINATION view)\
+ : seq(static_cast<filter_view<OtherSeq, Pred> COMBINATION>(view).seq)\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(FILTER_VIEW_CTOR)
+
+#undef FILTER_VIEW_CTOR
+
         template<typename OtherSeq>
         explicit filter_view(BOOST_FUSION_R_ELSE_LREF(OtherSeq) other_seq)
           : seq(BOOST_FUSION_FORWARD(OtherSeq,other_seq))
         {}
 
- seq_type seq;
+ template<typename OtherFilterView>
+ filter_view&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherFilterView) other_view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherFilterView,other_view).seq;
+ return *this;
+ }
+
+ detail::view_storage<Seq> seq;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -33,10 +33,23 @@
         typedef Last last_type;
         typedef Pred pred_type;
 
- filter_iterator(First const& first)
+ template<typename OtherFilterIt>
+ filter_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherFilterIt) it)
+ : first(it.first)
+ {}
+
+ filter_iterator(First const& first,int)
           : first(filter::call(first))
         {}
 
+ template<typename OtherFilterIt>
+ filter_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherFilterIt) it)
+ {
+ first=it.first;
+ return *this;
+ }
+
         first_type first;
     };
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -33,9 +33,9 @@
                 typedef typename result_of::deref<pos>::type type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return *advance<N>(s.first);
+ return *advance<N>(seq.first);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -28,9 +28,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return s.first;
+ return seq.first;
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -28,9 +28,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return s.last;
+ return seq.last;
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -38,11 +38,26 @@
         typedef Last end_type;
         typedef typename traits::category_of<First>::type category;
 
+ template<typename OtherIteratorRange>
+ iterator_range(BOOST_FUSION_R_ELSE_LREF(OtherIteratorRange) other_range)
+ : first(other_range.first)
+ , last(other_range.last)
+ {}
+
         iterator_range(First const& first, Last const& last)
           : first(first)
           , last(last)
         {}
 
+ template<typename OtherIteratorRange>
+ iterator_range&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherIteratorRange) other_range)
+ {
+ first=other_range.first;
+ last=other_range.last;
+ return *this;
+ }
+
         begin_type first;
         end_type last;
     };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -53,21 +53,23 @@
                 type;
 
                 static type
- call(SeqRef s, mpl::true_)
+ call(SeqRef seq, mpl::true_)
                 {
- return fusion::begin(s.seq2);
+ return fusion::begin(seq.seq2.get());
                 }
 
                 static type
- call(SeqRef s, mpl::false_)
+ call(SeqRef seq, mpl::false_)
                 {
- return type(fusion::begin(s.seq1),fusion::begin(s.seq2));
+ return type(
+ fusion::begin(seq.seq1.get())
+ , fusion::begin(seq.seq2.get()));
                 }
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return call(s, equal_to());
+ return call(seq, equal_to());
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -34,9 +34,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return fusion::deref(i.first);
+ return fusion::deref(it.first);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -36,9 +36,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return fusion::end(s.seq2);
+ return fusion::end(seq.seq2.get());
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,21 +46,21 @@
                 type;
 
                 static type
- call(ItRef i, mpl::true_)
+ call(ItRef it, mpl::true_)
                 {
- return i.concat;
+ return it.concat;
                 }
 
                 static type
- call(ItRef i, mpl::false_)
+ call(ItRef it, mpl::false_)
                 {
- return type(fusion::next(i.first), i.concat);
+ return type(fusion::next(it.first), it.concat);
                 }
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return call(i, equal_to());
+ return call(it, equal_to());
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -14,6 +14,7 @@
 #include <boost/fusion/support/sequence_base.hpp>
 #include <boost/fusion/support/ref.hpp>
 #include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
 
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/plus.hpp>
@@ -41,20 +42,8 @@
         typedef forward_traversal_tag category;
         typedef mpl::true_ is_view;
 
- typedef typename
- mpl::if_<
- traits::is_view<Seq1>
- , typename detail::remove_reference<Seq1>::type
- , typename detail::add_lref<Seq1>::type
- >::type
- seq1_type;
- typedef typename
- mpl::if_<
- traits::is_view<Seq2>
- , typename detail::remove_reference<Seq2>::type
- , typename detail::add_lref<Seq2>::type
- >::type
- seq2_type;
+ typedef typename detail::view_storage<Seq1>::type seq1_type;
+ typedef typename detail::view_storage<Seq2>::type seq2_type;
 
         typedef typename
             mpl::plus<
@@ -63,6 +52,12 @@
>::type
         size;
 
+ template<typename OtherJointView>
+ joint_view(BOOST_FUSION_R_ELSE_LREF(OtherJointView) other_view)
+ : seq1(BOOST_FUSION_FORWARD(OtherJointView,other_view).seq1)
+ , seq2(BOOST_FUSION_FORWARD(OtherJointView,other_view).seq2)
+ {}
+
         template<typename OtherSeq1, typename OtherSeq2>
         joint_view(BOOST_FUSION_R_ELSE_LREF(OtherSeq1) other_seq1,
                 BOOST_FUSION_R_ELSE_LREF(OtherSeq2) other_seq2)
@@ -70,8 +65,17 @@
           , seq2(BOOST_FUSION_FORWARD(OtherSeq2,other_seq2))
         {}
 
- seq1_type seq1;
- seq2_type seq2;
+ template<typename OtherJointView>
+ OtherJointView&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherJointView) other_view)
+ {
+ seq1=BOOST_FUSION_FORWARD(OtherJointView,other_view).seq1;
+ seq2=BOOST_FUSION_FORWARD(OtherJointView,other_view).seq2;
+ return *this;
+ }
+
+ detail::view_storage<Seq1> seq1;
+ detail::view_storage<Seq2> seq2;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -41,9 +41,10 @@
                 typedef reverse_view_iterator<advanced_type> type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(boost::fusion::advance<negative_dist>(i.first));
+ return type(
+ boost::fusion::advance<negative_dist>(it.first));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -39,9 +39,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::end(s.seq));
+ return type(fusion::end(seq.seq.get()));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -37,9 +37,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return fusion::deref(fusion::prior(i.first));
+ return fusion::deref(fusion::prior(it.first));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -41,9 +41,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::begin(s.seq));
+ return type(fusion::begin(seq.seq.get()));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -36,9 +36,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(fusion::prior(i.first));
+ return type(fusion::prior(it.first));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -16,6 +16,7 @@
 #include <boost/fusion/support/category_of.hpp>
 #include <boost/fusion/support/sequence_base.hpp>
 #include <boost/fusion/support/assert.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
 
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/mpl/bool.hpp>
@@ -37,13 +38,7 @@
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
         typedef mpl::true_ is_view;
 
- typedef typename
- mpl::if_<
- traits::is_view<Seq>
- , typename detail::remove_reference<Seq>::type
- , typename detail::add_lref<Seq>::type
- >::type
- seq_type;
+ typedef typename detail::view_storage<Seq>::type seq_type;
         typedef typename traits::category_of<seq_type>::type category;
         typedef typename result_of::size<seq_type>::type size;
 
@@ -52,12 +47,31 @@
         // typename traits::category_of<first_type>::type>::value),
         // "underlying iterator must be bidirectional");
 
+#define REVERSE_VIEW_CTOR(COMBINATION)\
+ template<typename OtherSeq>\
+ reverse_view(reverse_view<OtherSeq> COMBINATION other_view)\
+ : seq(BOOST_FUSION_FORWARD(\
+ reverse_view<OtherSeq> COMBINATION,other_view).seq)\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(REVERSE_VIEW_CTOR)
+
+#undef REVERSE_VIEW_CTOR
+
         template<typename OtherSeq>
         explicit reverse_view(BOOST_FUSION_R_ELSE_LREF(OtherSeq) other_seq)
           : seq(BOOST_FUSION_FORWARD(OtherSeq,other_seq))
         {}
 
- seq_type seq;
+ template<typename OtherReverseView>
+ OtherReverseView&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherReverseView) other_view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherReverseView,other_view).seq;
+ return *this;
+ }
+
+ detail::view_storage<Seq> seq;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -31,7 +31,7 @@
                 static type
                 call(Sequence s)
                 {
- return type(s);
+ return type(s,0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -33,7 +33,7 @@
                 static type
                 call(Iterator const& i)
                 {
- return i.view.val;
+ return i.view->val;
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -8,15 +8,18 @@
 #ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
 #define BOOST_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
 
+//TODO save views directly
 //TODO as fusion element?!
+//TODO bidirectional
 
+#include <boost/fusion/sequence/intrinsic/front.hpp>
 #include <boost/fusion/support/ref.hpp>
 #include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/sequence_assign.hpp>
 #include <boost/fusion/support/detail/as_fusion_element.hpp>
 
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/int.hpp>
-#include <boost/type_traits/is_convertible.hpp>
 #include <boost/utility/enable_if.hpp>
 
 #include <boost/fusion/view/single_view/single_view_iterator.hpp>
@@ -44,24 +47,55 @@
           : val()
         {}
 
- single_view(single_view const& single_view)
- : val(single_view.val)
+#define SINGLE_VIEW_CTOR(COMBINATION)\
+ single_view(single_view COMBINATION view)\
+ : val(BOOST_FUSION_FORWARD(single_view COMBINATION,view).val)\
         {}
 
- //TODO !!!
- single_view(single_view& single_view)
- : val(single_view.val)
- {}
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(SINGLE_VIEW_CTOR)
+
+#undef SINGLE_VIEW_CTOR
 
- single_view(single_view&& single_view)
- : val(single_view.val)
+ template<typename SeqAssign>
+ single_view(BOOST_FUSION_R_ELSE_CLREF(SeqAssign) seq,
+ typename enable_if<
+ is_sequence_assign<BOOST_FUSION_R_ELSE_CLREF(SeqAssign)>
+ >::type* =NULL)
+ : val(fusion::front(seq.get()))
         {}
 
         template<typename OtherT>
- explicit single_view(BOOST_FUSION_R_ELSE_CLREF(OtherT) val)
+ explicit single_view(BOOST_FUSION_R_ELSE_CLREF(OtherT) val,
+ typename disable_if<
+ is_sequence_assign<BOOST_FUSION_R_ELSE_CLREF(OtherT)>
+ >::type* =NULL)
           : val(BOOST_FUSION_FORWARD(OtherT,val))
         {}
 
+ template<typename OtherT>
+ typename
+ disable_if<
+ is_sequence_assign<BOOST_FUSION_R_ELSE_CLREF(OtherT)>
+ , single_view&
+ >::type
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherT) val)
+ {
+ val=BOOST_FUSION_FORWARD(OtherT,val);
+ return *this;
+ }
+
+ template<typename SeqAssign>
+ typename
+ enable_if<
+ is_sequence_assign<BOOST_FUSION_R_ELSE_CLREF(SeqAssign)>
+ , single_view&
+ >::type
+ operator=(BOOST_FUSION_R_ELSE_CLREF(SeqAssign) seq)
+ {
+ val=fusion::front(seq.get());
+ return *this;
+ }
+
         value_type val;
     };
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -28,26 +28,41 @@
         typedef forward_traversal_tag category;
     };
 
- template <typename SingleView>
+ template <typename SingleViewRef>
     struct single_view_iterator
- : iterator_base<single_view_iterator<SingleView> >
+ : iterator_base<single_view_iterator<SingleViewRef> >
     {
         typedef single_view_iterator_tag fusion_tag;
         typedef forward_traversal_tag category;
 
- typedef SingleView view_type;
+ typedef SingleViewRef view_type;
         typedef typename
             detail::result_of_forward_as<
- SingleView,
- typename detail::remove_reference<SingleView>::type::value_type
+ SingleViewRef,
+ typename detail::remove_reference<
+ SingleViewRef
+ >::type::value_type
>::type
         value_type;
 
- explicit single_view_iterator(SingleView view)
- : view(view)
+ template<typename OtherSingleViewIt>
+ single_view_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherSingleViewIt) it)
+ : view(it.view)
         {}
 
- SingleView view;
+ single_view_iterator(SingleViewRef view, int)
+ : view(&view)
+ {}
+
+ template<typename OtherSingleViewIt>
+ single_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherSingleViewIt) it)
+ {
+ view=it.view;
+ return *this;
+ }
+
+ typename detail::remove_reference<SingleViewRef>::type* view;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -49,9 +49,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(boost::fusion::advance<Dist>(i.first), i.f);
+ return type(boost::fusion::advance<Dist>(it.first), *it.f);
                 }
             };
         };
@@ -82,11 +82,11 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(boost::fusion::advance<Dist>(i.first1)
- , boost::fusion::advance<Dist>(i.first2)
- , i.f);
+ return type(boost::fusion::advance<Dist>(it.first1)
+ , boost::fusion::advance<Dist>(it.first2)
+ , it.f);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -47,7 +47,7 @@
                 static type
                 call(SeqRef seq)
                 {
- return seq.f(boost::fusion::at<N>(seq.seq));
+ return seq.f(boost::fusion::at<N>(seq.seq.get()));
                 }
             };
         };
@@ -78,8 +78,9 @@
 
                 static type call(SeqRef seq)
                 {
- return seq.f(boost::fusion::at<N>(seq.seq1),
- boost::fusion::at<N>(seq.seq2));
+ return seq.f(
+ boost::fusion::at<N>(seq.seq1.get()),
+ boost::fusion::at<N>(seq.seq2.get()));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,9 +46,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::begin(s.seq), s.f);
+ return type(fusion::begin(seq.seq.get()), seq.f);
                 }
             };
         };
@@ -74,12 +74,12 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
                     return type(
- fusion::begin(s.seq1),
- fusion::begin(s.seq2),
- s.f);
+ fusion::begin(seq.seq1.get()),
+ fusion::begin(seq.seq2.get()),
+ seq.f);
                 }
             };
         };

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-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -48,7 +48,7 @@
                 static type
                 call(ItRef it)
                 {
- return it.f(fusion::deref(it.first));
+ return (*it.f)(fusion::deref(it.first));
                 }
             };
         };
@@ -77,11 +77,11 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return i.f(
- fusion::deref(i.first1)
- , fusion::deref(i.first2));
+ return (*it.f)(
+ fusion::deref(it.first1)
+ , fusion::deref(it.first2));
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -44,9 +44,9 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::end(s.seq), s.f);
+ return type(fusion::end(seq.seq.get()), seq.f);
                 }
             };
         };
@@ -72,9 +72,12 @@
                 type;
 
                 static type
- call(SeqRef s)
+ call(SeqRef seq)
                 {
- return type(fusion::end(s.seq1), fusion::end(s.seq2), s.f);
+ return type(
+ fusion::end(seq.seq1.get())
+ , fusion::end(seq.seq2.get())
+ , seq.f);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -45,9 +45,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(fusion::next(i.first), i.f);
+ return type(fusion::next(it.first), *it.f);
                 }
             };
         };
@@ -74,11 +74,11 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(fusion::next(i.first1),
- fusion::next(i.first2),
- i.f);
+ return type(fusion::next(it.first1),
+ fusion::next(it.first2),
+ *it.f);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -46,9 +46,9 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(fusion::prior(i.first), i.f);
+ return type(fusion::prior(it.first), *it.f);
                 }
             };
         };
@@ -77,11 +77,11 @@
                 type;
 
                 static type
- call(ItRef i)
+ call(ItRef it)
                 {
- return type(fusion::prior(i.first1),
- fusion::prior(i.first2),
- i.f);
+ return type(fusion::prior(it.first1),
+ fusion::prior(it.first2),
+ it.f);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -12,7 +12,6 @@
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/view/detail/strictest_traversal.hpp>
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
 # include <boost/fusion/container/vector/vector10.hpp>
 #else
@@ -23,6 +22,8 @@
 #include <boost/fusion/support/ref.hpp>
 #include <boost/fusion/support/is_view.hpp>
 #include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
 
 #include <boost/mpl/bool.hpp>
 
@@ -49,20 +50,8 @@
         // result_of::size<Sequence1>,==,result_of::size<Sequence2>,
         // "both sequences must have the same length");
 
- typedef typename
- mpl::if_<
- traits::is_view<Seq1>
- , typename detail::remove_reference<Seq1>::type
- , typename detail::add_lref<Seq1>::type
- >::type
- seq1_type;
- typedef typename
- mpl::if_<
- traits::is_view<Seq2>
- , typename detail::remove_reference<Seq2>::type
- , typename detail::add_lref<Seq2>::type
- >::type
- seq2_type;
+ typedef typename detail::view_storage<Seq1>::type seq1_type;
+ typedef typename detail::view_storage<Seq2>::type seq2_type;
         typedef F transform_type;
 
         typedef transform_view2_tag fusion_tag;
@@ -79,6 +68,13 @@
         category;
         typedef typename result_of::size<seq1_type>::type size;
 
+ template<typename OtherTransformView>
+ transform_view(BOOST_FUSION_R_ELSE_LREF(OtherTransformView) other_view)
+ : seq1(BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq1)
+ , seq2(BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq2)
+ , f(BOOST_FUSION_FORWARD(OtherTransformView,other_view).f)
+ {}
+
         template<typename OtherSeq1, typename OtherSeq2,typename OtherF>
         transform_view(BOOST_FUSION_R_ELSE_LREF(OtherSeq1) seq1,
                 BOOST_FUSION_R_ELSE_LREF(OtherSeq2) seq2,
@@ -88,8 +84,18 @@
           , f(BOOST_FUSION_FORWARD(OtherF,f))
         {}
 
- seq1_type seq1;
- seq2_type seq2;
+ template<typename OtherTransformView>
+ OtherTransformView&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherTransformView) other_view)
+ {
+ seq1=BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq1;
+ seq2=BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq2;
+ f=BOOST_FUSION_FORWARD(OtherTransformView,other_view).f;
+ return *this;
+ }
+
+ detail::view_storage<Seq1> seq1;
+ detail::view_storage<Seq2> seq2;
         transform_type f;
     };
 
@@ -118,6 +124,12 @@
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
         typedef mpl::true_ is_view;
 
+ template<typename OtherTransformView>
+ transform_view(BOOST_FUSION_R_ELSE_LREF(OtherTransformView) view)
+ : seq(BOOST_FUSION_FORWARD(OtherTransformView,view).seq)
+ , f(BOOST_FUSION_FORWARD(OtherTransformView,view).f)
+ {}
+
         template<typename OtherSeq, typename OtherF>
         transform_view(BOOST_FUSION_R_ELSE_LREF(OtherSeq) seq,
                 BOOST_FUSION_R_ELSE_LREF(OtherF) f)
@@ -125,7 +137,16 @@
           , f(BOOST_FUSION_FORWARD(OtherF,f))
         {}
 
- seq_type seq;
+ template<typename OtherTransformView>
+ OtherTransformView&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherTransformView) view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherTransformView,view).seq;
+ f=BOOST_FUSION_FORWARD(OtherTransformView,view).f;
+ return *this;
+ }
+
+ detail::view_storage<Seq> seq;
         transform_type f;
     };
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -35,13 +35,29 @@
         typedef transform_view_iterator_tag fusion_tag;
         typedef typename traits::category_of<first_type>::type category;
 
+ template<typename OtherTransformViewIt>
+ transform_view_iterator(
+ BOOST_FUSION_R_ELSE_CLREF(OtherTransformViewIt) it)
+ : first(it.first)
+ , f(it.f)
+ {}
+
         transform_view_iterator(First const& first, transform_type f)
           : first(first)
- , f(f)
+ , f(&f)
         {}
 
+ template<typename OtherTransformViewIt>
+ transform_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformViewIt) it)
+ {
+ first=it.first;
+ f=it.f;
+ return *this;
+ }
+
         first_type first;
- transform_type f;
+ typename detail::remove_reference<transform_type>::type* f;
     };
 
     // Binary Version
@@ -58,17 +74,35 @@
         typedef transform_view_iterator2_tag fusion_tag;
         typedef typename traits::category_of<first1_type>::type category;
 
+ template<typename OtherTransformViewIt>
+ transform_view_iterator2(
+ BOOST_FUSION_R_ELSE_CLREF(OtherTransformViewIt) it)
+ : first1(it.first1)
+ , first2(it.first2)
+ , f(it.f)
+ {}
+
         transform_view_iterator2(First1 const& first1,
                 First2 const& first2,
                 FRef f)
           : first1(first1)
           , first2(first2)
- , f(f)
+ , f(&f)
         {}
 
+ template<typename OtherTransformViewIt>
+ transform_view_iterator2&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformViewIt) it)
+ {
+ first1=it.first1;
+ first2=it.first2;
+ f=it.f;
+ return *this;
+ }
+
         first1_type first1;
         first2_type first2;
- transform_type f;
+ typename detail::remove_reference<transform_type>::type* f;
     };
 }}
 

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -65,8 +65,12 @@
                 static type
                 call(ItRef it)
                 {
- return type(fusion::transform(
- it.iterators_, detail::poly_advance<N>()));
+ return type(
+ fusion::transform(
+ it.iterators_
+ , detail::poly_advance<N>()
+ )
+ , 0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -38,8 +38,7 @@
                            , result_of::begin<SeqRef>
>
             {
- //TODO cschmidt: !!!
- BOOST_MPL_ASSERT((is_reference<SeqRef>));
+ BOOST_MPL_ASSERT((detail::is_lrref<SeqRef>));
             };
 
             template<typename Seq>
@@ -85,8 +84,9 @@
                 static type
                 call(SeqRef seq)
                 {
- return type(fusion::transform(
- seq.seqs, detail::poly_begin()));
+ return type(
+ fusion::transform(seq.seqs, detail::poly_begin())
+ , 0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -50,7 +50,7 @@
                            , get_endpoint<SeqRef, M>
>
             {
- BOOST_MPL_ASSERT((is_reference<SeqRef>));
+ BOOST_MPL_ASSERT((detail::is_lrref<SeqRef>));
             };
 
             template<typename Seq>
@@ -95,9 +95,12 @@
                 static type
                 call(SeqRef seq)
                 {
- return type(fusion::transform(
- seq.seqs,
- detail::endpoints<typename seq::size>()));
+ return type(
+ fusion::transform(
+ seq.seqs
+ , detail::endpoints<typename seq::size>()
+ )
+ , 0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -82,7 +82,8 @@
                 call(ItRef it)
                 {
                     return type(
- fusion::transform(it.iterators_, detail::poly_next()));
+ fusion::transform(it.iterators_, detail::poly_next())
+ , 0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -82,7 +82,8 @@
                 call(ItRef it)
                 {
                     return type(
- fusion::transform(it.iterators_, detail::poly_prior()));
+ fusion::transform(it.iterators_, detail::poly_prior())
+ , 0);
                 }
             };
         };

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -108,7 +108,7 @@
     struct zip_view
       : sequence_base< zip_view<Seqs> >
     {
- //TODO cschmidt: ?!
+ //TODO cschmidt: replace view& with view
         typedef typename
             result_of::remove<Seqs, unused_type const&>::type
         real_seqs;
@@ -132,11 +132,30 @@
             fusion::result_of::as_vector<Seqs>::type
         seqs_type;
 
+#define ZIP_VIEW_CTOR(COMBINATION)\
+ template<typename OtherSeqs>\
+ zip_view(zip_view<OtherSeqs> COMBINATION other_view)\
+ : seqs(sequence_assign(BOOST_FUSION_FORWARD(\
+ zip_view<OtherSeqs> COMBINATION,other_view).seq))\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(ZIP_VIEW_CTOR)
+
+#undef ZIP_VIEW_CTOR
+
         template<typename OtherSeqs>
         explicit zip_view(BOOST_FUSION_R_ELSE_LREF(OtherSeqs) other_seqs)
- : seqs(BOOST_FUSION_FORWARD(OtherSeqs,other_seqs))
+ : seqs(sequence_assign(BOOST_FUSION_FORWARD(OtherSeqs,other_seqs)))
         {}
 
+ template<typename OtherZipView>
+ zip_view&
+ operator=(BOOST_FUSION_R_ELSE_LREF(OtherZipView) other_zip_view)
+ {
+ seqs=BOOST_FUSION_FORWARD(OtherZipView,other_zip_view).seqs;
+ return *this;
+ }
+
         seqs_type seqs;
     };
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view_iterator.hpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -33,18 +33,26 @@
         typedef zip_view_iterator_tag fusion_tag;
         typedef Traversal category;
 
- //TODO !!!
- zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(zip_view_iterator) it)
- : iterators_(std::move(it._iterators_))
- {
- }
+ template<typename OtherZipViewIt>
+ zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherZipViewIt) it)
+ : iterators_(sequence_assign(
+ BOOST_FUSION_FORWARD(OtherZipViewIt,it).iterators_))
+ {}
 
         template<typename InitSeq>
- zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(InitSeq) iterator_seq)
+ zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(InitSeq) seq,int)
           : iterators_(
- sequence_assign(BOOST_FUSION_FORWARD(InitSeq,iterator_seq)))
+ sequence_assign(BOOST_FUSION_FORWARD(InitSeq,seq)))
         {}
 
+ template<typename OtherZipViewIt>
+ zip_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherZipViewIt) it)
+ {
+ iterators_=BOOST_FUSION_FORWARD(OtherZipViewIt,it).iterators_;
+ return *this;
+ }
+
         typedef typename result_of::as_vector<ItSeq>::type iterators;
         iterators iterators_;
     };

Modified: sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -7,42 +7,30 @@
 #include <utility>
 #include <iostream>
 
-#include <boost/fusion/adapted/mpl.hpp>
-#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/sequence.hpp>
+#include <boost/fusion/iterator.hpp>
+//#include <boost/fusion/algorithm.hpp>
+#include <boost/fusion/container.hpp>
+#include <boost/fusion/view.hpp>
 
-#include <boost/fusion/container/set.hpp>
-#include <boost/fusion/sequence/intrinsic/at_key.hpp>
-
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/container/vector/convert.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/iterator/next.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/container/generation/vector_tie.hpp>
-
-#include <boost/fusion/container/map.hpp>
-#include <boost/fusion/container/generation/make_map.hpp>
-
-#include <boost/fusion/container/list/list.hpp>
-#include <boost/fusion/container/list/cons.hpp>
-#include <boost/fusion/container/generation/make_cons.hpp>
-
-#include <boost/fusion/sequence/io/out.hpp>
-
-#include <boost/fusion/view/zip_view.hpp>
+#include <boost/mpl/placeholders.hpp>
 
 namespace fusion=boost::fusion;
 
-template<class... Args> class get_vec_type
+struct moveable
 {
-public:
- typedef fusion::result_of::as_vector<boost::mpl::vector<char,float> >::type type;
- //typedef fusion::vector<Args...> type;
+ moveable()=default;
+ moveable(const moveable&)=delete;
+ moveable(moveable&&){}
 };
 
-typedef get_vec_type<char,short,int,long,float,double>::type vec;
+template<class... Args>
+struct get_vec_type
+{
+ typedef fusion::vector<Args...> type;
+};
+
+typedef get_vec_type<char,short,int,long,float,double,moveable>::type vec;
 typedef const vec cvec;
 
 typedef vec& lvec;
@@ -50,12 +38,71 @@
 typedef const vec& clvec;
 typedef const vec&& crvec;
 
-class moveable
+template<typename Seq>
+void seq_test(Seq&& seq)
 {
-public:
- moveable()=default;
- moveable(const moveable&)=delete;
- moveable(moveable&&){}
+ using namespace fusion;
+
+ typedef typename detail::identity<Seq>::type id_seq;
+
+ typename result_of::begin<id_seq>::type beg=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq>::type cbeg=begin(std::forward<Seq>(seq));
+
+ typename result_of::begin<id_seq&>::type beg2=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq&>::type cbeg2=begin(std::forward<Seq>(seq));
+
+ typename result_of::begin<id_seq&&>::type beg3=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq&&>::type cbeg3=begin(std::forward<Seq>(seq));
+
+ beg=beg;
+ cbeg=beg;
+
+ beg2=beg2;
+ cbeg2=beg2;
+
+ beg3=beg3;
+ cbeg3=beg3;
+
+ beg=beg2;
+ beg=beg3;
+ cbeg=beg2;
+ cbeg=cbeg2;
+ cbeg=beg3;
+ cbeg=cbeg3;
+
+ beg2=beg;
+ beg2=beg3;
+ cbeg2=beg;
+ cbeg2=cbeg;
+ cbeg2=beg3;
+ cbeg2=cbeg3;
+
+ beg3=beg2;
+ beg3=beg;
+ cbeg3=beg2;
+ cbeg3=cbeg2;
+ cbeg3=beg;
+ cbeg3=cbeg;
+
+ //beg=cbeg2;
+
+ deref(begin(std::forward<Seq>(seq)));
+ advance_c<1>(begin(std::forward<Seq>(seq)));
+ end(std::forward<Seq>(seq));
+}
+
+struct identity_int
+{
+ template<typename>
+ struct result
+ {
+ typedef int type;
+ };
+
+ int operator()(int i)
+ {
+ return i;
+ }
 };
 
 int main()
@@ -73,27 +120,26 @@
     }
 
     {
- using namespace fusion;
- vector<moveable> m;
- vector<moveable> m2=std::move(m);
- m=std::move(m2);
-
- int i=0;
- make_vector(boost::cref(i));
+ vec v;
+ vec v2=std::move(v);
+ //vec v2=v;
     }
 
     {
         using namespace fusion;
- set<int,float,double> s(0,0,0);
- at_key<int>(s)=0;
- }
-
- {
- using namespace fusion;
- std::cout << deref(begin(make_map<int>(1))) << std::endl;
-
- map<pair<char,char>,pair<int,int> > m('X', 123);
- std::cout << m << std::endl;
- std::cout << make_map<char, int>('X', 123) << std::endl;
+ seq_test(make_vector(0,1));
+ seq_test(make_cons(0,make_cons(1)));
+ seq_test(make_list(0,1));
+ seq_test(make_set(0,1.0f));
+ seq_test(make_map<int,float>(0,1.0f));
+
+ seq_test(single_view<int>(0));
+ seq_test(filter_view<vector<int>&&,std::is_same<boost::mpl::_,int> >(vector<int>()));
+ vector<int> vec;
+ seq_test(iterator_range<result_of::begin<vector<int>>::type,result_of::end<vector<int>>::type>(begin(vec),end(vec)));
+ seq_test(joint_view<vector<int>&&,vector<int>&&>(vector<int>(),vector<int>()));
+ seq_test(zip_view<vector<vector<int>&&, vector<int>&&> >(vector_tie(vector<int>(),vector<int>())));
+ seq_test(transform_view<vector<int>&&,identity_int>(vector<int>(),identity_int()));
+ seq_test(reverse_view<vector<int>&&>(vector<int>()));
     }
 }

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp 2009-07-04 18:24:58 EDT (Sat, 04 Jul 2009)
@@ -72,12 +72,9 @@
         typedef result_of::begin<vector_type>::type begin;
         typedef result_of::end<vector_type>::type end;
         typedef detail::static_find_if<begin, end, is_same<_, long> > filter;
- typedef filter::type type;
 
- BOOST_TEST(*type(v) == 987654);
- std::cout << *type(v) << std::endl;
- std::cout << *filter::call(begin(v)) << std::endl;
- BOOST_TEST(*type(v) == *filter::call(begin(v)));
+ std::cout << *filter::call(boost::fusion::begin(v)) << std::endl;
+ BOOST_TEST(*filter::call(boost::fusion::begin(v)) == 987654);
     }
 
     {


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