Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80918 - trunk/boost/geometry/multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-10-09 18:39:51


Author: bruno.lalande
Date: 2012-10-09 18:39:51 EDT (Tue, 09 Oct 2012)
New Revision: 80918
URL: http://svn.boost.org/trac/boost/changeset/80918

Log:
Applied latest change to multi-for_each.
Text files modified:
   trunk/boost/geometry/multi/algorithms/for_each.hpp | 35 +++++++++++++++++------------------
   1 files changed, 17 insertions(+), 18 deletions(-)

Modified: trunk/boost/geometry/multi/algorithms/for_each.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/for_each.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/for_each.hpp 2012-10-09 18:39:51 EDT (Tue, 09 Oct 2012)
@@ -40,14 +40,11 @@
 <
     typename MultiGeometry,
     typename Functor,
- bool IsConst,
     typename Policy
>
 struct for_each_multi
 {
- static inline Functor apply(
- typename add_const_if_c<IsConst, MultiGeometry>::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 @@
 template
 <
     typename MultiGeometry,
- typename Functor,
- bool IsConst
+ typename Functor
>
-struct for_each_point<multi_tag, MultiGeometry, Functor, IsConst>
+struct for_each_point<multi_tag, MultiGeometry, Functor>
     : 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 @@
                         <
                             typename tag<MultiGeometry>::type
>::type,
- typename boost::range_value<MultiGeometry>::type,
- Functor,
- IsConst
+ typename add_const_if_c
+ <
+ is_const<MultiGeometry>::value,
+ typename boost::range_value<MultiGeometry>::type
+ >::type,
+ Functor
>
>
 {};
@@ -96,15 +94,13 @@
 template
 <
     typename MultiGeometry,
- typename Functor,
- bool IsConst
+ typename Functor
>
-struct for_each_segment<multi_tag, MultiGeometry, Functor, IsConst>
+struct for_each_segment<multi_tag, MultiGeometry, Functor>
     : 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 @@
                         <
                             typename tag<MultiGeometry>::type
>::type,
- typename boost::range_value<MultiGeometry>::type,
- Functor,
- IsConst
+ typename add_const_if_c
+ <
+ is_const<MultiGeometry>::value,
+ typename boost::range_value<MultiGeometry>::type
+ >::type,
+ Functor
>
>
 {};


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