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

source code of boost/libs/geometry/test/algorithms/set_operations/setop_output_type.hpp