]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/distance/distance_brute_force.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / distance / distance_brute_force.hpp
index 82d0015b80a7e5027db6c87e97d45d571d5f8ad6..7c975cc1ffe2c89053f10c4e91f892bb07a6cb4c 100644 (file)
@@ -1,10 +1,10 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 // Unit Test
 
-// Copyright (c) 2014, 2018 Oracle and/or its affiliates.
-
+// Copyright (c) 2014-2021 Oracle and/or its affiliates.
 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 
 // Licensed under the Boost Software License version 1.0.
 // http://www.boost.org/users/license.html
@@ -14,9 +14,9 @@
 
 #include <iterator>
 
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/value_type.hpp>
 
 #include <boost/geometry/core/reverse_dispatch.hpp>
 #include <boost/geometry/core/tag.hpp>
@@ -43,17 +43,13 @@ struct distance_from_bg
 {
     template <typename G>
     struct use_distance_from_bg
-    {
-        typedef typename boost::mpl::or_
+        : util::bool_constant
             <
-                boost::is_same<typename tag<G>::type, point_tag>,
-                typename boost::mpl::or_
-                    <
-                        boost::is_same<typename tag<G>::type, segment_tag>,
-                        boost::is_same<typename tag<G>::type, box_tag>
-                    >::type
-            >::type type;
-    };
+                std::is_same<typename tag<G>::type, point_tag>::value
+             || std::is_same<typename tag<G>::type, segment_tag>::value
+             || std::is_same<typename tag<G>::type, box_tag>::value
+            >
+    {};
 
     template <typename Geometry1, typename Geometry2, typename Strategy>
     static inline
@@ -62,8 +58,12 @@ struct distance_from_bg
           Geometry2 const& geometry2,
           Strategy const& strategy)
     {
-        BOOST_MPL_ASSERT((typename use_distance_from_bg<Geometry1>::type));
-        BOOST_MPL_ASSERT((typename use_distance_from_bg<Geometry2>::type));
+        BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg<Geometry1>::value),
+                                     "Unexpected kind of Geometry1",
+                                     Geometry1);
+        BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg<Geometry2>::value),
+                                     "Unexpected kind of Geometry2",
+                                     Geometry2);
 
         return geometry::distance(geometry1, geometry2, strategy);
     }