]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/util/select_coordinate_type.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / util / select_coordinate_type.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6
7 // This file was modified by Oracle on 2014.
8 // Modifications copyright (c) 2014 Oracle and/or its affiliates.
9
10 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
11
12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
14
15 // Use, modification and distribution is subject to the Boost Software License,
16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
18
19 #ifndef BOOST_GEOMETRY_UTIL_SELECT_COORDINATE_TYPE_HPP
20 #define BOOST_GEOMETRY_UTIL_SELECT_COORDINATE_TYPE_HPP
21
22
23 #include <boost/geometry/core/coordinate_type.hpp>
24 #include <boost/geometry/util/select_most_precise.hpp>
25
26
27 namespace boost { namespace geometry
28 {
29
30
31 /*!
32 \brief Meta-function selecting the most precise coordinate type
33 of two geometries
34 \ingroup utility
35 */
36 template <typename T1, typename T2 = void, typename T3 = void>
37 struct select_coordinate_type
38 {
39 typedef typename select_most_precise
40 <
41 typename coordinate_type<T1>::type,
42 typename coordinate_type<T2>::type,
43 typename coordinate_type<T3>::type
44 >::type type;
45 };
46
47 template <typename T1, typename T2>
48 struct select_coordinate_type<T1, T2, void>
49 {
50 typedef typename select_most_precise
51 <
52 typename coordinate_type<T1>::type,
53 typename coordinate_type<T2>::type
54 >::type type;
55 };
56
57 template <typename T1>
58 struct select_coordinate_type<T1, void, void>
59 {
60 typedef typename select_most_precise
61 <
62 typename coordinate_type<T1>::type
63 >::type type;
64 };
65
66 }} // namespace boost::geometry
67
68
69 #endif // BOOST_GEOMETRY_UTIL_SELECT_COORDINATE_TYPE_HPP