]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/equals/point_point.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / equals / point_point.hpp
index 06a784284e67b4b6b2f28ae3c3a5e0fae6213d48..26eaff95c8822c7010ff07b3d7540d6bdebb2f4c 100644 (file)
@@ -5,8 +5,8 @@
 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland
 
-// This file was modified by Oracle on 2013-2018.
-// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013-2020.
+// Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
 
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EQUALS_POINT_POINT_HPP
 
 
+#include <type_traits>
+
+#include <boost/geometry/strategies/detail.hpp>
+
+
 namespace boost { namespace geometry
 {
 
@@ -33,7 +38,23 @@ namespace detail { namespace equals
     \brief Internal utility function to detect of points are disjoint
     \note To avoid circular references
  */
-template <typename Point1, typename Point2, typename Strategy>
+template
+<
+    typename Point1, typename Point2, typename Strategy,
+    std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
+>
+inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
+                               Strategy const& strategy)
+{
+    typedef decltype(strategy.relate(point1, point2)) strategy_type;
+    return strategy_type::apply(point1, point2);
+}
+
+template
+<
+    typename Point1, typename Point2, typename Strategy,
+    std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
+>
 inline bool equals_point_point(Point1 const& point1, Point2 const& point2,
                                Strategy const& )
 {