diff --git a/doc/src/docutils/tools/support_status/support_status.cpp b/doc/src/docutils/tools/support_status/support_status.cpp index df14199fa..7255dee89 100644 --- a/doc/src/docutils/tools/support_status/support_status.cpp +++ b/doc/src/docutils/tools/support_status/support_status.cpp @@ -47,17 +47,11 @@ struct check_distance {}; template -struct check_convert - : boost::geometry::dispatch::convert< - typename boost::geometry::tag_cast::type, boost::geometry::multi_tag>::type, - typename boost::geometry::tag_cast::type, boost::geometry::multi_tag>::type, - G1, - G2 - > +struct check_convert: boost::geometry::dispatch::convert {}; -template +template struct distance_tester { template @@ -90,7 +84,7 @@ struct distance_tester }; -template +template struct convert_tester { template diff --git a/include/boost/geometry/algorithms/assign.hpp b/include/boost/geometry/algorithms/assign.hpp index 411e4db83..23b175a22 100644 --- a/include/boost/geometry/algorithms/assign.hpp +++ b/include/boost/geometry/algorithms/assign.hpp @@ -163,13 +163,7 @@ inline void assign(Geometry1& geometry1, Geometry2 const& geometry2) , (types) ); - dispatch::convert - < - typename tag::type, - typename tag::type, - Geometry2, - Geometry1 - >::apply(geometry2, geometry1); + dispatch::convert::apply(geometry2, geometry1); } diff --git a/include/boost/geometry/algorithms/convert.hpp b/include/boost/geometry/algorithms/convert.hpp index 526dc9c9f..9b4c360a1 100644 --- a/include/boost/geometry/algorithms/convert.hpp +++ b/include/boost/geometry/algorithms/convert.hpp @@ -214,8 +214,9 @@ namespace dispatch template < - typename Tag1, typename Tag2, typename Geometry1, typename Geometry2, + typename Tag1 = typename tag_cast::type, multi_tag>::type, + typename Tag2 = typename tag_cast::type, multi_tag>::type, std::size_t DimensionCount = dimension::type::value, bool UseAssignment = boost::is_same::value && !boost::is_array::value @@ -228,11 +229,11 @@ struct convert: boost::geometry::not_implemented, template < - typename Tag, typename Geometry1, typename Geometry2, + typename Tag, std::size_t DimensionCount > -struct convert +struct convert { // Same geometry type -> copy whole geometry static inline void apply(Geometry1 const& source, Geometry2& destination) @@ -247,7 +248,7 @@ template typename Geometry1, typename Geometry2, std::size_t DimensionCount > -struct convert +struct convert : detail::conversion::point_to_point {}; @@ -257,7 +258,7 @@ template typename Box1, typename Box2, std::size_t DimensionCount > -struct convert +struct convert : detail::conversion::indexed_to_indexed {}; @@ -267,19 +268,19 @@ template typename Segment1, typename Segment2, std::size_t DimensionCount > -struct convert +struct convert : detail::conversion::indexed_to_indexed {}; template -struct convert +struct convert : detail::conversion::segment_to_range {}; template -struct convert +struct convert : detail::conversion::range_to_range < Ring1, @@ -290,17 +291,17 @@ struct convert {}; template -struct convert +struct convert : detail::conversion::range_to_range {}; template -struct convert +struct convert : detail::conversion::polygon_to_polygon {}; template -struct convert +struct convert : detail::conversion::box_to_range < Box, @@ -312,7 +313,7 @@ struct convert template -struct convert +struct convert { static inline void apply(Box const& box, Polygon& polygon) { @@ -320,8 +321,8 @@ struct convert convert < - box_tag, ring_tag, Box, ring_type, + box_tag, ring_tag, 2, false >::apply(box, exterior_ring(polygon)); } @@ -329,7 +330,7 @@ struct convert template -struct convert +struct convert { static inline void apply(Point const& point, Box& box) { @@ -346,15 +347,15 @@ struct convert template -struct convert +struct convert { static inline void apply(Ring const& ring, Polygon& polygon) { typedef typename ring_type::type ring_type; convert < - ring_tag, ring_tag, Ring, ring_type, + ring_tag, ring_tag, DimensionCount, false >::apply(ring, exterior_ring(polygon)); } @@ -362,7 +363,7 @@ struct convert template -struct convert +struct convert { static inline void apply(Polygon const& polygon, Ring& ring) { @@ -370,8 +371,8 @@ struct convert convert < - ring_tag, ring_tag, ring_type, Ring, + ring_tag, ring_tag, DimensionCount, false >::apply(exterior_ring(polygon), ring); } @@ -402,13 +403,7 @@ inline void convert(Geometry1 const& geometry1, Geometry2& geometry2) { concept::check_concepts_and_equal_dimensions(); - dispatch::convert - < - typename tag_cast::type, multi_tag>::type, - typename tag_cast::type, multi_tag>::type, - Geometry1, - Geometry2 - >::apply(geometry1, geometry2); + dispatch::convert::apply(geometry1, geometry2); } diff --git a/include/boost/geometry/multi/algorithms/convert.hpp b/include/boost/geometry/multi/algorithms/convert.hpp index 6a37d04ce..ebd58dedd 100644 --- a/include/boost/geometry/multi/algorithms/convert.hpp +++ b/include/boost/geometry/multi/algorithms/convert.hpp @@ -74,13 +74,15 @@ namespace dispatch // version types might be the same and therefore we call boost::is_same again template -struct convert +struct convert : detail::conversion::multi_to_multi < Multi1, Multi2, convert < + typename boost::range_value::type, + typename boost::range_value::type, typename single_tag_of < typename tag::type @@ -89,28 +91,26 @@ struct convert < typename tag::type >::type, - typename boost::range_value::type, - typename boost::range_value::type, DimensionCount > > {}; -template -struct convert +template +struct convert : detail::conversion::single_to_multi < Single, Multi, convert < + Single, + typename boost::range_value::type, typename tag::type, typename single_tag_of < typename tag::type >::type, - Single, - typename boost::range_value::type, DimensionCount, false >