diff --git a/include/boost/geometry/algorithms/detail/overlay/assemble.hpp b/include/boost/geometry/algorithms/detail/overlay/assemble.hpp index 3a7e0af21..413402423 100644 --- a/include/boost/geometry/algorithms/detail/overlay/assemble.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/assemble.hpp @@ -14,6 +14,7 @@ #include #include +#include #include @@ -162,7 +163,13 @@ struct convert_ring template struct add_to_containment -{}; +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; template struct add_to_containment diff --git a/include/boost/geometry/algorithms/intersection.hpp b/include/boost/geometry/algorithms/intersection.hpp index a2a4c408e..b2af587f9 100644 --- a/include/boost/geometry/algorithms/intersection.hpp +++ b/include/boost/geometry/algorithms/intersection.hpp @@ -13,6 +13,7 @@ #include #include +#include #include @@ -118,8 +119,48 @@ template typename Strategy > struct intersection_inserter - : detail::overlay::overlay - +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPES + , (types) + ); +}; + + +template +< + typename Polygon1, typename Polygon2, + typename OutputIterator, + typename PolygonOut, + typename Strategy +> +struct intersection_inserter + < + polygon_tag, polygon_tag, polygon_tag, + Polygon1, Polygon2, + OutputIterator, PolygonOut, + Strategy + > : detail::overlay::overlay + +{}; + + +template +< + typename Polygon, typename Box, + typename OutputIterator, + typename PolygonOut, + typename Strategy +> +struct intersection_inserter + < + polygon_tag, box_tag, polygon_tag, + Polygon, Box, + OutputIterator, PolygonOut, + Strategy + > : detail::overlay::overlay + {}; diff --git a/include/boost/geometry/multi/algorithms/intersection.hpp b/include/boost/geometry/multi/algorithms/intersection.hpp index 1eebc356b..e214d245d 100644 --- a/include/boost/geometry/multi/algorithms/intersection.hpp +++ b/include/boost/geometry/multi/algorithms/intersection.hpp @@ -21,8 +21,41 @@ namespace boost { namespace geometry namespace dispatch { -// Currently empty, all done in overlay / assemble +template +< + typename Polygon, typename MultiPolygon, + typename OutputIterator, + typename PolygonOut, + typename Strategy +> +struct intersection_inserter + < + polygon_tag, multi_polygon_tag, polygon_tag, + Polygon, MultiPolygon, + OutputIterator, PolygonOut, + Strategy + > : detail::overlay::overlay + +{}; + + +template +< + typename MultiPolygon1, typename MultiPolygon2, + typename OutputIterator, + typename PolygonOut, + typename Strategy +> +struct intersection_inserter + < + multi_polygon_tag, multi_polygon_tag, polygon_tag, + MultiPolygon1, MultiPolygon2, + OutputIterator, PolygonOut, + Strategy + > : detail::overlay::overlay + +{}; } // namespace dispatch