From 2700a5a1ba64d0f1d93f8de775890e8462f9601b Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Wed, 25 Jan 2012 22:54:01 +0000 Subject: [PATCH] Made dispatch::within able to retrieve the tags by itself. [SVN r76693] --- include/boost/geometry/algorithms/within.hpp | 18 +++++++----------- .../boost/geometry/multi/algorithms/within.hpp | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/include/boost/geometry/algorithms/within.hpp b/include/boost/geometry/algorithms/within.hpp index d6fdb9b7e..19d5b3d1d 100644 --- a/include/boost/geometry/algorithms/within.hpp +++ b/include/boost/geometry/algorithms/within.hpp @@ -165,11 +165,11 @@ namespace dispatch template < - typename Tag1, - typename Tag2, typename Geometry1, typename Geometry2, - typename Strategy + typename Strategy, + typename Tag1 = typename tag::type, + typename Tag2 = typename tag::type > struct within { @@ -182,7 +182,7 @@ struct within template -struct within +struct within { static inline bool apply(Point const& point, Box const& box, Strategy const& strategy) { @@ -191,7 +191,7 @@ struct within }; template -struct within +struct within { static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy) { @@ -203,7 +203,7 @@ struct within template -struct within +struct within { static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy) { @@ -219,7 +219,7 @@ struct within }; template -struct within +struct within { static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy) { @@ -291,8 +291,6 @@ inline bool within(Geometry1 const& geometry1, Geometry2 const& geometry2) return dispatch::within < - typename tag::type, - typename tag::type, Geometry1, Geometry2, strategy_type @@ -344,8 +342,6 @@ inline bool within(Geometry1 const& geometry1, Geometry2 const& geometry2, return dispatch::within < - typename tag::type, - typename tag::type, Geometry1, Geometry2, Strategy diff --git a/include/boost/geometry/multi/algorithms/within.hpp b/include/boost/geometry/multi/algorithms/within.hpp index 9cb852305..2953bbd47 100644 --- a/include/boost/geometry/multi/algorithms/within.hpp +++ b/include/boost/geometry/multi/algorithms/within.hpp @@ -70,7 +70,7 @@ namespace dispatch { template -struct within +struct within { static inline bool apply(Point const& point, MultiPolygon const& multi_polygon, Strategy const& strategy)