Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76694 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-01-25 18:01:51


Author: bruno.lalande
Date: 2012-01-25 18:01:50 EST (Wed, 25 Jan 2012)
New Revision: 76694
URL: http://svn.boost.org/trac/boost/changeset/76694

Log:
Moved Strategy template param from class level to function level in dispatch::within.
Text files modified:
   trunk/boost/geometry/algorithms/within.hpp | 27 ++++++++++++++-------------
   trunk/boost/geometry/multi/algorithms/within.hpp | 5 +++--
   2 files changed, 17 insertions(+), 15 deletions(-)

Modified: trunk/boost/geometry/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/within.hpp (original)
+++ trunk/boost/geometry/algorithms/within.hpp 2012-01-25 18:01:50 EST (Wed, 25 Jan 2012)
@@ -167,7 +167,6 @@
 <
     typename Geometry1,
     typename Geometry2,
- typename Strategy,
     typename Tag1 = typename tag<Geometry1>::type,
     typename Tag2 = typename tag<Geometry2>::type
>
@@ -181,18 +180,20 @@
 };
 
 
-template <typename Point, typename Box, typename Strategy>
-struct within<Point, Box, Strategy, point_tag, box_tag>
+template <typename Point, typename Box>
+struct within<Point, Box, point_tag, box_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Box const& box, Strategy const& strategy)
     {
         return strategy.apply(point, box);
     }
 };
 
-template <typename Box1, typename Box2, typename Strategy>
-struct within<Box1, Box2, Strategy, box_tag, box_tag>
+template <typename Box1, typename Box2>
+struct within<Box1, Box2, box_tag, box_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
     {
         assert_dimension_equal<Box1, Box2>();
@@ -202,9 +203,10 @@
 
 
 
-template <typename Point, typename Ring, typename Strategy>
-struct within<Point, Ring, Strategy, point_tag, ring_tag>
+template <typename Point, typename Ring>
+struct within<Point, Ring, point_tag, ring_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy)
     {
         return detail::within::point_in_ring
@@ -218,9 +220,10 @@
     }
 };
 
-template <typename Point, typename Polygon, typename Strategy>
-struct within<Point, Polygon, Strategy, point_tag, polygon_tag>
+template <typename Point, typename Polygon>
+struct within<Point, Polygon, point_tag, polygon_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy)
     {
         return detail::within::point_in_polygon
@@ -292,8 +295,7 @@
     return dispatch::within
         <
             Geometry1,
- Geometry2,
- strategy_type
+ Geometry2
>::apply(geometry1, geometry2, strategy_type());
 }
 
@@ -343,8 +345,7 @@
     return dispatch::within
         <
             Geometry1,
- Geometry2,
- Strategy
+ Geometry2
>::apply(geometry1, geometry2, strategy);
 }
 

Modified: trunk/boost/geometry/multi/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/within.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/within.hpp 2012-01-25 18:01:50 EST (Wed, 25 Jan 2012)
@@ -69,9 +69,10 @@
 namespace dispatch
 {
 
-template <typename Point, typename MultiPolygon, typename Strategy>
-struct within<Point, MultiPolygon, Strategy, point_tag, multi_polygon_tag>
+template <typename Point, typename MultiPolygon>
+struct within<Point, MultiPolygon, point_tag, multi_polygon_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point,
                 MultiPolygon const& multi_polygon, Strategy const& 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