]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/util/promote_integral.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / geometry / test / util / promote_integral.cpp
index 92d1b8ce41189cae97d0d4144af3e8d76ca5db9f..670f78904cf626cc610d41a93d2a17ffacc7b360 100644 (file)
@@ -1,9 +1,10 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 // Unit Test
 
-// Copyright (c) 2015, Oracle and/or its affiliates.
+// Copyright (c) 2015-2020, Oracle and/or its affiliates.
 
 // 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
@@ -23,8 +24,6 @@
 #include <boost/test/included/unit_test.hpp>
 
 #include <boost/config.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_unsigned.hpp>
 
 #include <geometry_test_common.hpp>
 
@@ -83,8 +82,8 @@ namespace bg = boost::geometry;
 template
 <
     typename T,
-    bool Signed = boost::is_fundamental<T>::type::value
-    && ! boost::is_unsigned<T>::type::value
+    bool Signed = std::is_fundamental<T>::value
+    && ! std::is_unsigned<T>::value
 >
 struct absolute_value
 {
@@ -109,7 +108,7 @@ template
 <
     typename Integral,
     typename Promoted,
-    bool Signed = ! boost::is_unsigned<Promoted>::type::value
+    bool Signed = ! std::is_unsigned<Promoted>::value
 >
 struct test_max_values
 {
@@ -154,9 +153,9 @@ struct test_max_values<Integral, Promoted, false>
 template
 <
     typename T,
-    bool IsFundamental = boost::is_fundamental<T>::type::value
+    bool IsFundamental = std::is_fundamental<T>::value
 >
-struct bit_size_impl : boost::mpl::size_t<0>
+struct bit_size_impl : std::integral_constant<std::size_t, 0>
 {};
 
 template <typename T>
@@ -198,10 +197,10 @@ struct test_promote_integral
                 Type, PromoteUnsignedToUnsigned
             >::type promoted_integral_type;
 
-        bool const same_types = boost::is_same
+        bool const same_types = std::is_same
             <
                 promoted_integral_type, ExpectedPromotedType
-            >::type::value;
+            >::value;
 
         BOOST_CHECK_MESSAGE(same_types,
                             "case ID: " << case_id
@@ -211,10 +210,10 @@ struct test_promote_integral
                             << "; expected: "
                             << typeid(ExpectedPromotedType).name());
 
-        if (BOOST_GEOMETRY_CONDITION((! boost::is_same
+        if (BOOST_GEOMETRY_CONDITION((! std::is_same
                 <
                     Type, promoted_integral_type
-                >::type::value)))
+                >::value)))
         {
             test_max_values<Type, promoted_integral_type>::apply();
         }
@@ -253,7 +252,7 @@ template
 <
     typename T,
     bool PromoteUnsignedToUnsigned = false,
-    bool IsSigned = ! boost::is_unsigned<T>::type::value
+    bool IsSigned = ! std::is_unsigned<T>::value
 >
 struct test_promotion
 {
@@ -539,9 +538,4 @@ BOOST_AUTO_TEST_CASE( test_floating_point )
     tester2::apply<float, float>("fp-f");
     tester2::apply<double, double>("fp-d");
     tester2::apply<long double, long double>("fp-ld");
-
-#ifdef HAVE_TTMATH
-    tester1::apply<ttmath_big, ttmath_big>("fp-tt");
-    tester2::apply<ttmath_big, ttmath_big>("fp-tt");
-#endif
 }