From f0fa80ca1a2df9fa8f5cdd6ece015cb41521ef18 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Thu, 11 Aug 2011 23:58:03 +0000 Subject: [PATCH] const-correctness tweaks [SVN r73683] --- .../fusion/view/ext_/detail/next_impl.hpp | 5 +- .../fusion/view/ext_/segmented_fold_until.hpp | 7 ++- .../view/ext_/segmented_iterator_range.hpp | 48 ++++++++++++------- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/include/boost/fusion/view/ext_/detail/next_impl.hpp b/include/boost/fusion/view/ext_/detail/next_impl.hpp index 2e25d4e7..7341a319 100644 --- a/include/boost/fusion/view/ext_/detail/next_impl.hpp +++ b/include/boost/fusion/view/ext_/detail/next_impl.hpp @@ -7,6 +7,7 @@ #if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_NEXT_IMPL_HPP_INCLUDED) #define BOOST_FUSION_SEGMENTED_ITERATOR_NEXT_IMPL_HPP_INCLUDED +#include #include #include #include @@ -111,7 +112,9 @@ namespace boost { namespace fusion typename Range = typename remove_reference< typename add_const< - typename result_of::deref::type + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type, typename Result = diff --git a/include/boost/fusion/view/ext_/segmented_fold_until.hpp b/include/boost/fusion/view/ext_/segmented_fold_until.hpp index 799da3cd..990c0042 100644 --- a/include/boost/fusion/view/ext_/segmented_fold_until.hpp +++ b/include/boost/fusion/view/ext_/segmented_fold_until.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -48,8 +49,10 @@ namespace boost { namespace fusion Cur, typename result_of::end< typename remove_reference< - typename result_of::deref< - typename Context::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Context::car_type::begin_type + >::type >::type >::type >::type diff --git a/include/boost/fusion/view/ext_/segmented_iterator_range.hpp b/include/boost/fusion/view/ext_/segmented_iterator_range.hpp index 57de282d..4d80f67a 100644 --- a/include/boost/fusion/view/ext_/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/ext_/segmented_iterator_range.hpp @@ -72,8 +72,10 @@ namespace boost { namespace fusion { namespace detail typename add_const< typename result_of::segments< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type @@ -93,8 +95,10 @@ namespace boost { namespace fusion { namespace detail typename add_const< typename result_of::segments< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type @@ -138,8 +142,10 @@ namespace boost { namespace fusion { namespace detail result_of::equal_to< typename result_of::end< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type, @@ -151,8 +157,10 @@ namespace boost { namespace fusion { namespace detail typename Stack::cdr_type::car_type::begin_type, typename result_of::end< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type @@ -208,8 +216,10 @@ namespace boost { namespace fusion { namespace detail typename add_const< typename result_of::segments< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type @@ -226,8 +236,10 @@ namespace boost { namespace fusion { namespace detail typename add_const< typename result_of::segments< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type @@ -272,8 +284,10 @@ namespace boost { namespace fusion { namespace detail result_of::equal_to< typename result_of::end< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type, @@ -284,8 +298,10 @@ namespace boost { namespace fusion { namespace detail iterator_range< typename result_of::begin< typename remove_reference< - typename result_of::deref< - typename Stack::car_type::begin_type + typename add_const< + typename result_of::deref< + typename Stack::car_type::begin_type + >::type >::type >::type >::type,