diff --git a/include/boost/geometry/algorithms/centroid.hpp b/include/boost/geometry/algorithms/centroid.hpp index 048948de5..0fd711505 100644 --- a/include/boost/geometry/algorithms/centroid.hpp +++ b/include/boost/geometry/algorithms/centroid.hpp @@ -266,41 +266,32 @@ namespace dispatch template < typename Tag, - typename Geometry, - typename Point + typename Geometry > struct centroid {}; -template -< - typename Geometry, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_point {}; -template -< - typename Box, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_box {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_range::value> {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_range {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_polygon {}; @@ -340,8 +331,7 @@ inline void centroid(Geometry const& geometry, Point& c, dispatch::centroid < typename tag::type, - Geometry, - Point + Geometry >::apply(geometry, c, strategy); } diff --git a/include/boost/geometry/multi/algorithms/centroid.hpp b/include/boost/geometry/multi/algorithms/centroid.hpp index 1f73d4e9a..81cd75136 100644 --- a/include/boost/geometry/multi/algorithms/centroid.hpp +++ b/include/boost/geometry/multi/algorithms/centroid.hpp @@ -95,24 +95,16 @@ struct centroid_multi namespace dispatch { -template -< - typename MultiLinestring, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_range_state > {}; -template -< - typename MultiPolygon, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_polygon_state @@ -120,12 +112,8 @@ struct centroid {}; -template -< - typename MultiPoint, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_multi_point_state