]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/area.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / geometry / strategies / 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 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
9 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
10
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14
15 #ifndef BOOST_GEOMETRY_STRATEGIES_AREA_HPP
16 #define BOOST_GEOMETRY_STRATEGIES_AREA_HPP
17
18
19 #include <boost/geometry/core/coordinate_type.hpp>
20 #include <boost/geometry/util/select_most_precise.hpp>
21
22 #include <boost/mpl/assert.hpp>
23
24
25 namespace boost { namespace geometry
26 {
27
28
29 namespace strategy { namespace area
30 {
31
32
33 #ifndef DOXYGEN_NO_DETAIL
34 namespace detail
35 {
36
37 // If user specified a CalculationType, use that type, whatever it is
38 // and whatever the Geometry is.
39 // Else, use Geometry's coordinate-type promoted to double if needed.
40 template
41 <
42 typename Geometry,
43 typename CalculationType
44 >
45 struct result_type
46 {
47 typedef CalculationType type;
48 };
49
50 template
51 <
52 typename Geometry
53 >
54 struct result_type<Geometry, void>
55 : select_most_precise
56 <
57 typename coordinate_type<Geometry>::type,
58 double
59 >
60 {};
61
62 } // namespace detail
63 #endif // DOXYGEN_NO_DETAIL
64
65
66 namespace services
67 {
68
69 /*!
70 \brief Traits class binding a default area strategy to a coordinate system
71 \ingroup area
72 \tparam Tag tag of coordinate system
73 */
74 template <typename Tag>
75 struct default_strategy
76 {
77 BOOST_MPL_ASSERT_MSG
78 (
79 false, NOT_IMPLEMENTED_FOR_THIS_COORDINATE_SYSTEM
80 , (types<Tag>)
81 );
82 };
83
84
85 } // namespace services
86
87 }} // namespace strategy::area
88
89
90 }} // namespace boost::geometry
91
92 #endif // BOOST_GEOMETRY_STRATEGIES_AREA_HPP