]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/area/cartesian.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / strategies / area / cartesian.hpp
1 // Boost.Geometry
2
3 // Copyright (c) 2021, Oracle and/or its affiliates.
4
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9
10 #ifndef BOOST_GEOMETRY_STRATEGIES_AREA_CARTESIAN_HPP
11 #define BOOST_GEOMETRY_STRATEGIES_AREA_CARTESIAN_HPP
12
13
14 #include <boost/geometry/strategy/cartesian/area.hpp>
15 #include <boost/geometry/strategy/cartesian/area_box.hpp>
16
17 #include <boost/geometry/strategies/area/services.hpp>
18 #include <boost/geometry/strategies/detail.hpp>
19
20
21 namespace boost { namespace geometry
22 {
23
24 namespace strategies { namespace area
25 {
26
27 template <typename CalculationType = void>
28 struct cartesian : strategies::detail::cartesian_base
29 {
30 template <typename Geometry>
31 static auto area(Geometry const&,
32 std::enable_if_t<! util::is_box<Geometry>::value> * = nullptr)
33 {
34 return strategy::area::cartesian<CalculationType>();
35 }
36
37 template <typename Geometry>
38 static auto area(Geometry const&,
39 std::enable_if_t<util::is_box<Geometry>::value> * = nullptr)
40 {
41 return strategy::area::cartesian_box<CalculationType>();
42 }
43 };
44
45
46 namespace services
47 {
48
49 template <typename Geometry>
50 struct default_strategy<Geometry, cartesian_tag>
51 {
52 using type = strategies::area::cartesian<>;
53 };
54
55
56 template <typename CT>
57 struct strategy_converter<strategy::area::cartesian<CT> >
58 {
59 static auto get(strategy::area::cartesian<CT> const&)
60 {
61 return strategies::area::cartesian<CT>();
62 }
63 };
64
65
66 } // namespace services
67
68 }} // namespace strategies::area
69
70 }} // namespace boost::geometry
71
72 #endif // BOOST_GEOMETRY_STRATEGIES_AREA_CARTESIAN_HPP