Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80663 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-09-23 07:28:14


Author: bruno.lalande
Date: 2012-09-23 07:28:14 EDT (Sun, 23 Sep 2012)
New Revision: 80663
URL: http://svn.boost.org/trac/boost/changeset/80663

Log:
Moved Strategy template parameter from class level to function level in dispatch::perimeter.
Text files modified:
   trunk/boost/geometry/algorithms/perimeter.hpp | 18 +++++++++---------
   trunk/boost/geometry/multi/algorithms/perimeter.hpp | 8 ++++----
   2 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/boost/geometry/algorithms/perimeter.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/perimeter.hpp (original)
+++ trunk/boost/geometry/algorithms/perimeter.hpp 2012-09-23 07:28:14 EDT (Sun, 23 Sep 2012)
@@ -33,19 +33,20 @@
 {
 
 // Default perimeter is 0.0, specializations implement calculated values
-template <typename Tag, typename Geometry, typename Strategy>
+template <typename Tag, typename Geometry>
 struct perimeter : detail::calculate_null
 {
     typedef typename default_length_result<Geometry>::type return_type;
 
+ template <typename Strategy>
     static inline return_type apply(Geometry const& geometry, Strategy const& strategy)
     {
         return calculate_null::apply<return_type>(geometry, strategy);
     }
 };
 
-template <typename Geometry, typename Strategy>
-struct perimeter<ring_tag, Geometry, Strategy>
+template <typename Geometry>
+struct perimeter<ring_tag, Geometry>
     : detail::length::range_length
         <
             Geometry,
@@ -53,8 +54,8 @@
>
 {};
 
-template <typename Polygon, typename Strategy>
-struct perimeter<polygon_tag, Polygon, Strategy> : detail::calculate_polygon_sum
+template <typename Polygon>
+struct perimeter<polygon_tag, Polygon> : detail::calculate_polygon_sum
 {
     typedef typename default_length_result<Polygon>::type return_type;
     typedef detail::length::range_length
@@ -63,6 +64,7 @@
                     closure<Polygon>::value
> policy;
 
+ template <typename Strategy>
     static inline return_type apply(Polygon const& polygon, Strategy const& strategy)
     {
         return calculate_polygon_sum::apply<return_type, policy>(polygon, strategy);
@@ -104,8 +106,7 @@
     return dispatch::perimeter
         <
             typename tag<Geometry>::type,
- Geometry,
- strategy_type
+ Geometry
>::apply(geometry, strategy_type());
 }
 
@@ -134,8 +135,7 @@
     return dispatch::perimeter
         <
             typename tag<Geometry>::type,
- Geometry,
- Strategy
+ Geometry
>::apply(geometry, strategy);
 }
 

Modified: trunk/boost/geometry/multi/algorithms/perimeter.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/perimeter.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/perimeter.hpp 2012-09-23 07:28:14 EDT (Sun, 23 Sep 2012)
@@ -30,9 +30,10 @@
 #ifndef DOXYGEN_NO_DISPATCH
 namespace dispatch
 {
-template <typename MultiPolygon, typename Strategy>
-struct perimeter<multi_polygon_tag, MultiPolygon, Strategy> : detail::multi_sum
+template <typename MultiPolygon>
+struct perimeter<multi_polygon_tag, MultiPolygon> : detail::multi_sum
 {
+ template <typename Strategy>
     static inline typename default_length_result<MultiPolygon>::type
     apply(MultiPolygon const& multi, Strategy const& strategy)
     {
@@ -42,8 +43,7 @@
                    perimeter
                    <
                        polygon_tag,
- typename boost::range_value<MultiPolygon>::type,
- Strategy
+ typename boost::range_value<MultiPolygon>::type
>
>(multi, strategy);
     }


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