Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56381 - trunk/boost/fusion/view/nview/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-09-25 09:57:31


Author: hkaiser
Date: 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
New Revision: 56381
URL: http://svn.boost.org/trac/boost/changeset/56381

Log:
Fusion: resolved const correctness issue
Text files modified:
   trunk/boost/fusion/view/nview/detail/begin_impl.hpp | 7 +++----
   trunk/boost/fusion/view/nview/detail/deref_impl.hpp | 5 +++--
   trunk/boost/fusion/view/nview/detail/end_impl.hpp | 7 +++----
   trunk/boost/fusion/view/nview/detail/nview_impl.hpp | 3 ++-
   trunk/boost/fusion/view/nview/detail/value_of_impl.hpp | 3 ++-
   5 files changed, 13 insertions(+), 12 deletions(-)

Modified: trunk/boost/fusion/view/nview/detail/begin_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/begin_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/begin_impl.hpp 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
@@ -29,15 +29,14 @@
             template<typename Sequence>
             struct apply
             {
- typedef typename Sequence::sequence_type sequence_type;
                 typedef typename Sequence::index_type index_type;
 
- typedef nview_iterator<sequence_type,
+ typedef nview_iterator<Sequence,
                     typename mpl::begin<index_type>::type> type;
 
- static type call(Sequence& v)
+ static type call(Sequence& s)
                 {
- return type(v.seq);
+ return type(s);
                 }
             };
         };

Modified: trunk/boost/fusion/view/nview/detail/deref_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/deref_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/deref_impl.hpp 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
@@ -30,11 +30,12 @@
                 typedef typename Iterator::sequence_type sequence_type;
 
                 typedef typename result_of::deref<first_type>::type index;
- typedef typename result_of::at<sequence_type, index>::type type;
+ typedef typename result_of::at<
+ typename sequence_type::sequence_type, index>::type type;
 
                 static type call(Iterator const& i)
                 {
- return at<index>(i.seq);
+ return at<index>(i.seq.seq);
                 }
             };
         };

Modified: trunk/boost/fusion/view/nview/detail/end_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/end_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/end_impl.hpp 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
@@ -30,15 +30,14 @@
             template <typename Sequence>
             struct apply
             {
- typedef typename Sequence::sequence_type sequence_type;
                 typedef typename Sequence::index_type index_type;
 
- typedef nview_iterator<sequence_type,
+ typedef nview_iterator<Sequence,
                     typename mpl::end<index_type>::type> type;
 
- static type call(Sequence& v)
+ static type call(Sequence& s)
                 {
- return type(v.seq);
+ return type(s);
                 }
             };
         };

Modified: trunk/boost/fusion/view/nview/detail/nview_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/nview_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/nview_impl.hpp 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
@@ -10,6 +10,7 @@
 #if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM)
 #define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM
 
+#include <climits>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/repeat.hpp>
 #include <boost/preprocessor/iterate.hpp>
@@ -28,7 +29,7 @@
 namespace boost { namespace fusion { namespace result_of
 {
     template <typename Sequence
- , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, -1)>
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)>
     struct as_nview
     {
         typedef mpl::vector_c<

Modified: trunk/boost/fusion/view/nview/detail/value_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/value_of_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/value_of_impl.hpp 2009-09-25 09:57:30 EDT (Fri, 25 Sep 2009)
@@ -33,7 +33,8 @@
                 typedef typename Iterator::sequence_type sequence_type;
 
                 typedef typename result_of::deref<first_type>::type index;
- typedef typename result_of::at<sequence_type, index>::type type;
+ typedef typename result_of::at<
+ typename sequence_type::sequence_type, index>::type type;
             };
         };
     }


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