]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategy/area.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / strategy / area.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 // Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
7
8 // This file was modified by Oracle on 2020.
9 // Modifications copyright (c) 2020 Oracle and/or its affiliates.
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_STRATEGY_AREA_HPP
20 #define BOOST_GEOMETRY_STRATEGY_AREA_HPP
21
22
23 #include <boost/geometry/core/coordinate_type.hpp>
24 #include <boost/geometry/core/static_assert.hpp>
25
26 #include <boost/geometry/util/select_most_precise.hpp>
27
28
29 namespace boost { namespace geometry
30 {
31
32
33 namespace strategy { namespace area
34 {
35
36
37 #ifndef DOXYGEN_NO_DETAIL
38 namespace detail
39 {
40
41 // If user specified a CalculationType, use that type, whatever it is
42 // and whatever the Geometry is.
43 // Else, use Geometry's coordinate-type promoted to double if needed.
44 template
45 <
46 typename Geometry,
47 typename CalculationType
48 >
49 struct result_type
50 {
51 typedef CalculationType type;
52 };
53
54 template
55 <
56 typename Geometry
57 >
58 struct result_type<Geometry, void>
59 : select_most_precise
60 <
61 typename coordinate_type<Geometry>::type,
62 double
63 >
64 {};
65
66 } // namespace detail
67 #endif // DOXYGEN_NO_DETAIL
68
69
70 namespace services
71 {
72
73 /*!
74 \brief Traits class binding a default area strategy to a coordinate system
75 \ingroup area
76 \tparam Tag tag of coordinate system
77 */
78 template <typename Tag>
79 struct default_strategy
80 {
81 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
82 "Not implemented for this coordinate system.",
83 Tag);
84 };
85
86
87 } // namespace services
88
89 }} // namespace strategy::area
90
91
92 }} // namespace boost::geometry
93
94 #endif // BOOST_GEOMETRY_STRATEGY_AREA_HPP