]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/index/detail/distance_predicates.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / index / detail / distance_predicates.hpp
index aba951847f874ff6ba3afcb4d867c7ab813e123b..69ce456333e3d78fc96c37067ca79aa20dab2c6c 100644 (file)
@@ -5,8 +5,8 @@
 //
 // Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
 //
-// This file was modified by Oracle on 2019-2020.
-// Modifications copyright (c) 2019-2020 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2019-2021.
+// Modifications copyright (c) 2019-2021 Oracle and/or its affiliates.
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 //
 // Use, modification and distribution is subject to the Boost Software License,
@@ -22,7 +22,7 @@
 #include <boost/geometry/index/detail/algorithms/comparable_distance_far.hpp>
 #include <boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp>
 #include <boost/geometry/index/detail/algorithms/path_intersection.hpp>
-
+#include <boost/geometry/index/detail/predicates.hpp>
 #include <boost/geometry/index/detail/tags.hpp>
 
 namespace boost { namespace geometry { namespace index { namespace detail {
@@ -100,136 +100,40 @@ struct relation< to_furthest<T> >
 
 // ------------------------------------------------------------------ //
 
-template
-<
-    typename G1, typename G2, typename Strategy,
-    typename Tag1 = typename geometry::tag<G1>::type,
-    typename Tag2 = typename geometry::tag<G2>::type
->
-struct comparable_distance_call_base
-{
-    typedef typename geometry::default_comparable_distance_result
-        <
-            G1, G2
-        >::type result_type;
-
-    static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const&)
-    {
-        return geometry::comparable_distance(g1, g2);
-    }
-};
-
-template
-<
-    typename G1, typename G2, typename Strategy
->
-struct comparable_distance_call_base<G1, G2, Strategy, point_tag, point_tag>
-{
-    typedef typename geometry::comparable_distance_result
-        <
-            G1, G2,
-            typename Strategy::comparable_distance_point_point_strategy_type
-        >::type result_type;
-
-    static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const& s)
-    {
-        return geometry::comparable_distance(g1, g2,
-                s.get_comparable_distance_point_point_strategy());
-    }
-};
-
-template
-<
-    typename G1, typename G2, typename Strategy
->
-struct comparable_distance_call_base<G1, G2, Strategy, point_tag, box_tag>
-{
-    typedef typename geometry::comparable_distance_result
-        <
-            G1, G2,
-            typename Strategy::comparable_distance_point_box_strategy_type
-        >::type result_type;
-
-    static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const& s)
-    {
-        return geometry::comparable_distance(g1, g2,
-                s.get_comparable_distance_point_box_strategy());
-    }
-};
-
-template
-<
-    typename G1, typename G2, typename Strategy
->
-struct comparable_distance_call_base<G1, G2, Strategy, segment_tag, point_tag>
-{
-    typedef typename geometry::comparable_distance_result
-        <
-            G1, G2,
-            typename Strategy::comparable_distance_point_segment_strategy_type
-        >::type result_type;
-
-    static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const& s)
-    {
-        return geometry::comparable_distance(g1, g2,
-                s.get_comparable_distance_point_segment_strategy());
-    }
-};
-
 template
 <
     typename G1, typename G2, typename Strategy
 >
-struct comparable_distance_call_base<G1, G2, Strategy, segment_tag, box_tag>
+struct comparable_distance_call
 {
     typedef typename geometry::comparable_distance_result
         <
-            G1, G2,
-            typename Strategy::comparable_distance_segment_box_strategy_type
+            G1, G2, Strategy
         >::type result_type;
 
     static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const& s)
     {
-        return geometry::comparable_distance(g1, g2,
-                s.get_comparable_distance_segment_box_strategy());
+        return geometry::comparable_distance(g1, g2, s);
     }
 };
 
 template
 <
-    typename G1, typename G2, typename Strategy
+    typename G1, typename G2
 >
-struct comparable_distance_call_base<G1, G2, Strategy, segment_tag, segment_tag>
+struct comparable_distance_call<G1, G2, default_strategy>
 {
-    typedef typename geometry::comparable_distance_result
+    typedef typename geometry::default_comparable_distance_result
         <
-            G1, G2,
-            typename Strategy::comparable_distance_point_segment_strategy_type
+            G1, G2
         >::type result_type;
 
-    static inline result_type apply(G1 const& g1, G2 const& g2, Strategy const& s)
+    static inline result_type apply(G1 const& g1, G2 const& g2, default_strategy const&)
     {
-        return geometry::comparable_distance(g1, g2,
-                s.get_comparable_distance_point_segment_strategy());
+        return geometry::comparable_distance(g1, g2);
     }
 };
 
-template
-<
-    typename G1, typename G2, typename Strategy
->
-struct comparable_distance_call
-    : comparable_distance_call_base<G1, G2, Strategy>
-{};
-
-template
-<
-    typename G1, typename G2
->
-struct comparable_distance_call<G1, G2, default_strategy>
-    : comparable_distance_call_base<G1, G2, default_strategy, void, void>
-{};
-
 // ------------------------------------------------------------------ //
 // calculate_distance
 // ------------------------------------------------------------------ //