]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | ||
3 | // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. | |
4 | // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. | |
5 | // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. | |
6 | ||
20effc67 TL |
7 | // This file was modified by Oracle on 2018-2020. |
8 | // Modifications copyright (c) 2018-2020, Oracle and/or its affiliates. | |
92f5a8d4 TL |
9 | // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle |
10 | ||
7c673cae FG |
11 | // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library |
12 | // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. | |
13 | ||
14 | // Use, modification and distribution is subject to the Boost Software License, | |
15 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
16 | // http://www.boost.org/LICENSE_1_0.txt) | |
17 | ||
18 | #ifndef BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP | |
19 | #define BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP | |
20 | ||
21 | ||
92f5a8d4 TL |
22 | #include <boost/variant/variant_fwd.hpp> |
23 | ||
24 | #include <boost/geometry/core/point_type.hpp> | |
7c673cae FG |
25 | |
26 | ||
20effc67 TL |
27 | namespace boost { namespace geometry |
28 | { | |
29 | ||
30 | namespace detail | |
31 | { | |
32 | ||
33 | template <typename ...> | |
34 | struct parameter_pack_first_type {}; | |
35 | ||
36 | template <typename T, typename ... Ts> | |
37 | struct parameter_pack_first_type<T, Ts...> | |
38 | { | |
39 | typedef T type; | |
40 | }; | |
41 | ||
42 | } // namespace detail | |
7c673cae FG |
43 | |
44 | ||
45 | template <BOOST_VARIANT_ENUM_PARAMS(typename T)> | |
46 | struct point_type<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> > | |
20effc67 TL |
47 | : point_type |
48 | < | |
49 | typename detail::parameter_pack_first_type | |
50 | < | |
51 | BOOST_VARIANT_ENUM_PARAMS(T) | |
52 | >::type | |
53 | > | |
7c673cae FG |
54 | {}; |
55 | ||
56 | ||
20effc67 | 57 | }} // namespace boost::geometry |
7c673cae FG |
58 | |
59 | ||
60 | #endif // BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP |