diff --git a/doc/src/docutils/tools/support_status/support_status.cpp b/doc/src/docutils/tools/support_status/support_status.cpp index 7255dee89..a68d678e6 100644 --- a/doc/src/docutils/tools/support_status/support_status.cpp +++ b/doc/src/docutils/tools/support_status/support_status.cpp @@ -30,11 +30,9 @@ typedef boost::mpl::vector< > types; -template +template struct check_distance : boost::geometry::dispatch::distance< - Tag1, - Tag2, G1, G2, boost::geometry::strategy_tag_distance_point_point, @@ -57,11 +55,8 @@ struct distance_tester template void operator()(T2) { - typedef typename boost::geometry::tag::type tag1; - typedef typename boost::geometry::tag::type tag2; - - if (boost::is_base_of >::type::value - && boost::is_base_of >::type::value) + if (boost::is_base_of >::type::value + && boost::is_base_of >::type::value) { std::cout << "-\t"; } diff --git a/include/boost/geometry/algorithms/distance.hpp b/include/boost/geometry/algorithms/distance.hpp index 09340b6b5..5b330e1ab 100644 --- a/include/boost/geometry/algorithms/distance.hpp +++ b/include/boost/geometry/algorithms/distance.hpp @@ -247,9 +247,10 @@ using strategy::distance::services::return_type; template < - typename Tag1, typename Tag2, typename Geometry1, typename Geometry2, - typename StrategyTag, typename Strategy + typename StrategyTag, typename Strategy, + typename Tag1 = typename tag_cast::type, multi_tag>::type, + typename Tag2 = typename tag_cast::type, multi_tag>::type > struct distance: not_implemented, and_geometry > @@ -259,9 +260,9 @@ struct distance: not_implemented, template struct distance < - point_tag, point_tag, P1, P2, - strategy_tag_distance_point_point, Strategy + strategy_tag_distance_point_point, Strategy, + point_tag, point_tag > : detail::distance::point_to_point {}; @@ -271,9 +272,9 @@ struct distance template struct distance < - point_tag, linestring_tag, Point, Linestring, - strategy_tag_distance_point_point, Strategy + strategy_tag_distance_point_point, Strategy, + point_tag, linestring_tag > { @@ -300,9 +301,9 @@ struct distance template struct distance < - point_tag, linestring_tag, Point, Linestring, - strategy_tag_distance_point_segment, Strategy + strategy_tag_distance_point_segment, Strategy, + point_tag, linestring_tag > { static inline typename return_type::type apply(Point const& point, @@ -321,9 +322,9 @@ struct distance template struct distance < - point_tag, ring_tag, Point, Ring, - strategy_tag_distance_point_point, Strategy + strategy_tag_distance_point_point, Strategy, + point_tag, ring_tag > { typedef typename return_type::type return_type; @@ -356,9 +357,9 @@ struct distance template struct distance < - point_tag, polygon_tag, Point, Polygon, - strategy_tag_distance_point_point, Strategy + strategy_tag_distance_point_point, Strategy, + point_tag, polygon_tag > { typedef typename return_type::type return_type; @@ -392,9 +393,9 @@ struct distance template struct distance < - point_tag, segment_tag, Point, Segment, - strategy_tag_distance_point_point, Strategy + strategy_tag_distance_point_point, Strategy, + point_tag, segment_tag > : detail::distance::point_to_segment {}; @@ -402,8 +403,8 @@ struct distance template struct distance < - point_tag, segment_tag, Point, Segment, + point_tag, segment_tag, strategy_tag_distance_point_segment, Strategy > { @@ -423,9 +424,10 @@ struct distance // Strictly spoken this might be in namespace again template < - typename GeometryTag1, typename GeometryTag2, typename G1, typename G2, - typename StrategyTag, typename Strategy + typename StrategyTag, typename Strategy, + typename GeometryTag1 = typename tag_cast::type, multi_tag>::type, + typename GeometryTag2 = typename tag_cast::type, multi_tag>::type > struct distance_reversed { @@ -434,7 +436,6 @@ struct distance_reversed { return distance < - GeometryTag2, GeometryTag1, G2, G1, StrategyTag, Strategy >::apply(g2, g1, strategy); @@ -493,8 +494,6 @@ inline typename strategy::distance::services::return_type::type distan typename geometry::reverse_dispatch::type, dispatch::distance_reversed < - typename tag_cast::type, multi_tag>::type, - typename tag_cast::type, multi_tag>::type, Geometry1, Geometry2, typename strategy::distance::services::tag::type, @@ -502,8 +501,6 @@ inline typename strategy::distance::services::return_type::type distan >, dispatch::distance < - typename tag_cast::type, multi_tag>::type, - typename tag_cast::type, multi_tag>::type, Geometry1, Geometry2, typename strategy::distance::services::tag::type, diff --git a/include/boost/geometry/multi/algorithms/distance.hpp b/include/boost/geometry/multi/algorithms/distance.hpp index e59ab63ce..3edde6804 100644 --- a/include/boost/geometry/multi/algorithms/distance.hpp +++ b/include/boost/geometry/multi/algorithms/distance.hpp @@ -105,17 +105,17 @@ namespace dispatch template < - typename SingleGeometryTag, typename G1, typename G2, - typename Strategy + typename Strategy, + typename SingleGeometryTag > -struct distance +struct distance : detail::distance::distance_single_to_multi {}; template -struct distance +struct distance : detail::distance::distance_multi_to_multi {};