]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/policies/robustness/segment_ratio.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / policies / robustness / segment_ratio.hpp
index 59ac79e3876786fc4adc39ab7a5ad398d3951772..c9e012e90e0f2511e22dc96a19f8dc7428fb6028 100644 (file)
@@ -2,8 +2,8 @@
 
 // Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands.
 
-// This file was modified by Oracle on 2016.
-// Modifications copyright (c) 2016 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2016-2020.
+// Modifications copyright (c) 2016-2020 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,
@@ -13,6 +13,8 @@
 #ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_SEGMENT_RATIO_HPP
 #define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_SEGMENT_RATIO_HPP
 
+#include <type_traits>
+
 #include <boost/config.hpp>
 #include <boost/rational.hpp>
 
@@ -30,7 +32,7 @@ namespace detail { namespace segment_ratio
 template
 <
     typename Type,
-    bool IsIntegral = boost::is_integral<Type>::type::value
+    bool IsIntegral = std::is_integral<Type>::type::value
 >
 struct less {};
 
@@ -63,7 +65,7 @@ struct less<Type, false>
 template
 <
     typename Type,
-    bool IsIntegral = boost::is_integral<Type>::type::value
+    bool IsIntegral = std::is_integral<Type>::type::value
 >
 struct equal {};
 
@@ -239,10 +241,12 @@ private :
     // if Type is non-fundamental type
     //typedef typename promote_floating_point<Type>::type fp_type;
 
-    typedef typename boost::mpl::if_c
+    // TODO: What with user-defined numeric types?
+    //       Shouldn't here is_integral be checked?
+    typedef std::conditional_t
         <
-            boost::is_float<Type>::value, Type, double
-        >::type fp_type;
+            std::is_floating_point<Type>::value, Type, double
+        > fp_type;
 
     Type m_numerator;
     Type m_denominator;