diff --git a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp index d10b094d..1e4ad268 100644 --- a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp +++ b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp @@ -20,27 +20,17 @@ namespace boost { namespace fusion template struct segmented_equal_to : mpl::and_< - result_of::equal_to< - typename Stack1::car_type::begin_type, - typename Stack2::car_type::begin_type - >, segmented_equal_to< typename Stack1::cdr_type, typename Stack2::cdr_type > + , result_of::equal_to< + typename Stack1::car_type::begin_type, + typename Stack2::car_type::begin_type + > > {}; - template - struct segmented_equal_to - : mpl::false_ - {}; - - template - struct segmented_equal_to - : mpl::false_ - {}; - template <> struct segmented_equal_to : mpl::true_ diff --git a/include/boost/fusion/iterator/detail/segmented_iterator.hpp b/include/boost/fusion/iterator/detail/segmented_iterator.hpp index 270fd089..ccd45fbf 100644 --- a/include/boost/fusion/iterator/detail/segmented_iterator.hpp +++ b/include/boost/fusion/iterator/detail/segmented_iterator.hpp @@ -7,6 +7,7 @@ #if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED) #define BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED +#include #include #include #include @@ -15,7 +16,6 @@ #include #include #include -#include namespace boost { namespace fusion { @@ -82,13 +82,8 @@ namespace boost { namespace fusion //} template struct key_of - { - typedef - typename result_of::key_of< - typename It::context_type::car_type::begin_type - >::type - type; - }; + : result_of::key_of + {}; //auto value_of(it) //{ @@ -96,13 +91,8 @@ namespace boost { namespace fusion //} template struct value_of - { - typedef - typename result_of::value_of< - typename It::context_type::car_type::begin_type - >::type - type; - }; + : result_of::value_of + {}; //auto value_of_data(it) //{ @@ -110,21 +100,26 @@ namespace boost { namespace fusion //} template struct value_of_data - { - typedef - typename result_of::value_of_data< - typename It::context_type::car_type::begin_type - >::type - type; - }; + : result_of::value_of_data + {}; // Compare all the segment iterators in each stack, starting with // the bottom-most. - template + template < + typename It1 + , typename It2 + , int Size1 = It1::context_type::size::value + , int Size2 = It2::context_type::size::value + > struct equal_to + : mpl::false_ + {}; + + template + struct equal_to : detail::segmented_equal_to< - typename detail::reverse_cons::type, - typename detail::reverse_cons::type + typename It1::context_type + , typename It2::context_type > {}; diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp index e4da6171..968718eb 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp @@ -22,19 +22,19 @@ namespace boost { namespace fusion { namespace detail // return make_segmented_iterator( segmented_begin_impl( seq, nil ) ); //} - template + template struct segmented_begin { typedef segmented_iterator< - typename segmented_begin_impl::type + typename segmented_begin_impl::type > type; static type call(Sequence& seq) { return type( - segmented_begin_impl::call(seq, fusion::nil())); + segmented_begin_impl::call(seq, Nil())); } }; diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp index 4a3d5bf7..469862ac 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp @@ -7,9 +7,9 @@ #if !defined(BOOST_FUSION_SEGMENTED_END_HPP_INCLUDED) #define BOOST_FUSION_SEGMENTED_END_HPP_INCLUDED -#include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -18,19 +18,19 @@ namespace boost { namespace fusion { namespace detail // return make_segmented_iterator( segmented_end_impl( seq ) ); //} - template + template struct segmented_end { typedef segmented_iterator< - typename segmented_end_impl::type + typename segmented_end_impl::type > type; static type call(Sequence & seq) { return type( - segmented_end_impl::call(seq, fusion::nil())); + segmented_end_impl::call(seq, Nil())); } };