Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76671 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-01-24 16:05:33


Author: bruno.lalande
Date: 2012-01-24 16:05:31 EST (Tue, 24 Jan 2012)
New Revision: 76671
URL: http://svn.boost.org/trac/boost/changeset/76671

Log:
Made dispatch::covered_by able to retrieve the tags by itself.
Text files modified:
   trunk/boost/geometry/algorithms/covered_by.hpp | 18 +++++++-----------
   trunk/boost/geometry/multi/algorithms/covered_by.hpp | 2 +-
   2 files changed, 8 insertions(+), 12 deletions(-)

Modified: trunk/boost/geometry/algorithms/covered_by.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/covered_by.hpp (original)
+++ trunk/boost/geometry/algorithms/covered_by.hpp 2012-01-24 16:05:31 EST (Tue, 24 Jan 2012)
@@ -33,11 +33,11 @@
 
 template
 <
- typename Tag1,
- typename Tag2,
     typename Geometry1,
     typename Geometry2,
- typename Strategy
+ typename Strategy,
+ typename Tag1 = typename tag<Geometry1>::type,
+ typename Tag2 = typename tag<Geometry2>::type
>
 struct covered_by
 {
@@ -50,7 +50,7 @@
 
 
 template <typename Point, typename Box, typename Strategy>
-struct covered_by<point_tag, box_tag, Point, Box, Strategy>
+struct covered_by<Point, Box, Strategy, point_tag, box_tag>
 {
     static inline bool apply(Point const& point, Box const& box, Strategy const& strategy)
     {
@@ -59,7 +59,7 @@
 };
 
 template <typename Box1, typename Box2, typename Strategy>
-struct covered_by<box_tag, box_tag, Box1, Box2, Strategy>
+struct covered_by<Box1, Box2, Strategy, box_tag, box_tag>
 {
     static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
     {
@@ -71,7 +71,7 @@
 
 
 template <typename Point, typename Ring, typename Strategy>
-struct covered_by<point_tag, ring_tag, Point, Ring, Strategy>
+struct covered_by<Point, Ring, Strategy, point_tag, ring_tag>
 {
     static inline bool apply(Point const& point, Ring const& ring, Strategy const& )
     {
@@ -87,7 +87,7 @@
 };
 
 template <typename Point, typename Polygon, typename Strategy>
-struct covered_by<point_tag, polygon_tag, Point, Polygon, Strategy>
+struct covered_by<Point, Polygon, Strategy, point_tag, polygon_tag>
 {
     static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy)
     {
@@ -151,8 +151,6 @@
 
     return dispatch::covered_by
         <
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
             Geometry1,
             Geometry2,
             strategy_type
@@ -193,8 +191,6 @@
 
     return dispatch::covered_by
         <
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
             Geometry1,
             Geometry2,
             Strategy

Modified: trunk/boost/geometry/multi/algorithms/covered_by.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/covered_by.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/covered_by.hpp 2012-01-24 16:05:31 EST (Tue, 24 Jan 2012)
@@ -30,7 +30,7 @@
 {
 
 template <typename Point, typename MultiPolygon, typename Strategy>
-struct covered_by<point_tag, multi_polygon_tag, Point, MultiPolygon, Strategy>
+struct covered_by<Point, MultiPolygon, Strategy, point_tag, multi_polygon_tag>
 {
     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