From 35b39be71ad9906a5ad7e222873574db07973d04 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Tue, 9 Oct 2012 22:39:51 +0000 Subject: [PATCH] Applied latest change to multi-for_each. [SVN r80918] --- .../geometry/multi/algorithms/for_each.hpp | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/include/boost/geometry/multi/algorithms/for_each.hpp b/include/boost/geometry/multi/algorithms/for_each.hpp index 1be38e0a7..932c490b5 100644 --- a/include/boost/geometry/multi/algorithms/for_each.hpp +++ b/include/boost/geometry/multi/algorithms/for_each.hpp @@ -40,14 +40,11 @@ template < typename MultiGeometry, typename Functor, - bool IsConst, typename Policy > struct for_each_multi { - static inline Functor apply( - typename add_const_if_c::type& multi, - Functor f) + static inline Functor apply(MultiGeometry& multi, Functor f) { for(BOOST_AUTO_TPL(it, boost::begin(multi)); it != boost::end(multi); ++it) { @@ -69,15 +66,13 @@ namespace dispatch template < typename MultiGeometry, - typename Functor, - bool IsConst + typename Functor > -struct for_each_point +struct for_each_point : detail::for_each::for_each_multi < MultiGeometry, Functor, - IsConst, // Specify the dispatch of the single-version as policy for_each_point < @@ -85,9 +80,12 @@ struct for_each_point < typename tag::type >::type, - typename boost::range_value::type, - Functor, - IsConst + typename add_const_if_c + < + is_const::value, + typename boost::range_value::type + >::type, + Functor > > {}; @@ -96,15 +94,13 @@ struct for_each_point template < typename MultiGeometry, - typename Functor, - bool IsConst + typename Functor > -struct for_each_segment +struct for_each_segment : detail::for_each::for_each_multi < MultiGeometry, Functor, - IsConst, // Specify the dispatch of the single-version as policy for_each_segment < @@ -112,9 +108,12 @@ struct for_each_segment < typename tag::type >::type, - typename boost::range_value::type, - Functor, - IsConst + typename add_const_if_c + < + is_const::value, + typename boost::range_value::type + >::type, + Functor > > {};