1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2016, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 // Licensed under the Boost Software License version 1.0.
7 // http://www.boost.org/users/license.html
9 #ifndef BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP
10 #define BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP
14 #include <boost/geometry/core/tags.hpp>
15 #include <boost/geometry/core/tag.hpp>
17 #include <boost/geometry/geometries/geometries.hpp>
19 template <typename Single, typename Tag = typename bg::tag<Single>::type>
20 struct setop_output_type
22 typedef std::vector<Single> type;
25 template <typename Polygon>
26 struct setop_output_type<Polygon, bg::polygon_tag>
28 typedef bg::model::multi_polygon<Polygon> type;
31 template <typename Linestring>
32 struct setop_output_type<Linestring, bg::linestring_tag>
34 typedef bg::model::multi_linestring<Linestring> type;
37 template <typename Point>
38 struct setop_output_type<Point, bg::point_tag>
40 typedef bg::model::multi_point<Point> type;
43 #endif // BOOST_GEOMETRY_TEST_SETOP_OUTPUT_TYPE_HPP