$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r76693 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-01-25 17:54:03
Author: bruno.lalande
Date: 2012-01-25 17:54:01 EST (Wed, 25 Jan 2012)
New Revision: 76693
URL: http://svn.boost.org/trac/boost/changeset/76693
Log:
Made dispatch::within able to retrieve the tags by itself.
Text files modified: 
   trunk/boost/geometry/algorithms/within.hpp       |    18 +++++++-----------                      
   trunk/boost/geometry/multi/algorithms/within.hpp |     2 +-                                      
   2 files changed, 8 insertions(+), 12 deletions(-)
Modified: trunk/boost/geometry/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/within.hpp	(original)
+++ trunk/boost/geometry/algorithms/within.hpp	2012-01-25 17:54:01 EST (Wed, 25 Jan 2012)
@@ -165,11 +165,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 within
 {
@@ -182,7 +182,7 @@
 
 
 template <typename Point, typename Box, typename Strategy>
-struct within<point_tag, box_tag, Point, Box, Strategy>
+struct within<Point, Box, Strategy, point_tag, box_tag>
 {
     static inline bool apply(Point const& point, Box const& box, Strategy const& strategy)
     {
@@ -191,7 +191,7 @@
 };
 
 template <typename Box1, typename Box2, typename Strategy>
-struct within<box_tag, box_tag, Box1, Box2, Strategy>
+struct within<Box1, Box2, Strategy, box_tag, box_tag>
 {
     static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
     {
@@ -203,7 +203,7 @@
 
 
 template <typename Point, typename Ring, typename Strategy>
-struct within<point_tag, ring_tag, Point, Ring, Strategy>
+struct within<Point, Ring, Strategy, point_tag, ring_tag>
 {
     static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy)
     {
@@ -219,7 +219,7 @@
 };
 
 template <typename Point, typename Polygon, typename Strategy>
-struct within<point_tag, polygon_tag, Point, Polygon, Strategy>
+struct within<Point, Polygon, Strategy, point_tag, polygon_tag>
 {
     static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy)
     {
@@ -291,8 +291,6 @@
 
     return dispatch::within
         <
-            typename tag<Geometry1>::type,
-            typename tag<Geometry2>::type,
             Geometry1,
             Geometry2,
             strategy_type
@@ -344,8 +342,6 @@
 
     return dispatch::within
         <
-            typename tag<Geometry1>::type,
-            typename tag<Geometry2>::type,
             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 17:54:01 EST (Wed, 25 Jan 2012)
@@ -70,7 +70,7 @@
 {
 
 template <typename Point, typename MultiPolygon, typename Strategy>
-struct within<point_tag, multi_polygon_tag, Point, MultiPolygon, Strategy>
+struct within<Point, MultiPolygon, Strategy, point_tag, multi_polygon_tag>
 {
     static inline bool apply(Point const& point, 
                 MultiPolygon const& multi_polygon, Strategy const& strategy)