mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-11 11:52:11 +00:00
Moved Strategy template parameter from class level to function level in dispatch::covered_by.
[SVN r76672]
This commit is contained in:
@@ -35,7 +35,6 @@ template
|
||||
<
|
||||
typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Strategy,
|
||||
typename Tag1 = typename tag<Geometry1>::type,
|
||||
typename Tag2 = typename tag<Geometry2>::type
|
||||
>
|
||||
@@ -49,18 +48,20 @@ struct covered_by
|
||||
};
|
||||
|
||||
|
||||
template <typename Point, typename Box, typename Strategy>
|
||||
struct covered_by<Point, Box, Strategy, point_tag, box_tag>
|
||||
template <typename Point, typename Box>
|
||||
struct covered_by<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 covered_by<Box1, Box2, Strategy, box_tag, box_tag>
|
||||
template <typename Box1, typename Box2>
|
||||
struct covered_by<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>();
|
||||
@@ -70,9 +71,10 @@ struct covered_by<Box1, Box2, Strategy, box_tag, box_tag>
|
||||
|
||||
|
||||
|
||||
template <typename Point, typename Ring, typename Strategy>
|
||||
struct covered_by<Point, Ring, Strategy, point_tag, ring_tag>
|
||||
template <typename Point, typename Ring>
|
||||
struct covered_by<Point, Ring, point_tag, ring_tag>
|
||||
{
|
||||
template <typename Strategy>
|
||||
static inline bool apply(Point const& point, Ring const& ring, Strategy const& )
|
||||
{
|
||||
return detail::within::point_in_ring
|
||||
@@ -86,9 +88,10 @@ struct covered_by<Point, Ring, Strategy, point_tag, ring_tag>
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Point, typename Polygon, typename Strategy>
|
||||
struct covered_by<Point, Polygon, Strategy, point_tag, polygon_tag>
|
||||
template <typename Point, typename Polygon>
|
||||
struct covered_by<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
|
||||
@@ -152,8 +155,7 @@ inline bool covered_by(Geometry1 const& geometry1, Geometry2 const& geometry2)
|
||||
return dispatch::covered_by
|
||||
<
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
strategy_type
|
||||
Geometry2
|
||||
>::apply(geometry1, geometry2, strategy_type());
|
||||
}
|
||||
|
||||
@@ -192,8 +194,7 @@ inline bool covered_by(Geometry1 const& geometry1, Geometry2 const& geometry2,
|
||||
return dispatch::covered_by
|
||||
<
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
Strategy
|
||||
Geometry2
|
||||
>::apply(geometry1, geometry2, strategy);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,10 @@ namespace boost { namespace geometry
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Point, typename MultiPolygon, typename Strategy>
|
||||
struct covered_by<Point, MultiPolygon, Strategy, point_tag, multi_polygon_tag>
|
||||
template <typename Point, typename MultiPolygon>
|
||||
struct covered_by<Point, MultiPolygon, point_tag, multi_polygon_tag>
|
||||
{
|
||||
template <typename Strategy>
|
||||
static inline bool apply(Point const& point,
|
||||
MultiPolygon const& multi_polygon, Strategy const& strategy)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user