]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/polygon/isotropy.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / polygon / isotropy.hpp
index 117d6a55d66a932097de25fe50c3763bd8615073..615ae399dd8fa0264d45cdc6376779b1deb04d4f 100644 (file)
@@ -40,12 +40,6 @@ typedef boost::ulong_long_type polygon_ulong_long_type;
 //typedef long long polygon_long_long_type;
 //typedef unsigned long long polygon_ulong_long_type;
 #endif
-#include <boost/mpl/size_t.hpp>
-#include <boost/mpl/protect.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/or.hpp>
 #else
 
 #ifdef _WIN32
@@ -57,54 +51,6 @@ typedef boost::ulong_long_type polygon_ulong_long_type;
 #define BOOST_POLYGON_USE_LONG_LONG
 typedef long long polygon_long_long_type;
 typedef unsigned long long polygon_ulong_long_type;
-
-  namespace boost {
-    template <bool B, class T   = void>
-    struct enable_if_c {
-      typedef T type;
-    };
-
-    template <class T>
-    struct enable_if_c<false, T> {};
-
-    template <class Cond, class T = void>
-    struct enable_if : public enable_if_c<Cond::value, T> {};
-
-    template <bool B, class T>
-    struct lazy_enable_if_c {
-      typedef typename T::type type;
-    };
-
-    template <class T>
-    struct lazy_enable_if_c<false, T> {};
-
-    template <class Cond, class T>
-    struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
-
-
-    template <bool B, class T = void>
-    struct disable_if_c {
-      typedef T type;
-    };
-
-    template <class T>
-    struct disable_if_c<true, T> {};
-
-    template <class Cond, class T = void>
-    struct disable_if : public disable_if_c<Cond::value, T> {};
-
-    template <bool B, class T>
-    struct lazy_disable_if_c {
-      typedef typename T::type type;
-    };
-
-    template <class T>
-    struct lazy_disable_if_c<true, T> {};
-
-    template <class Cond, class T>
-    struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
-  }
-
 #endif
 
 namespace boost { namespace polygon{
@@ -266,22 +212,6 @@ namespace boost { namespace polygon{
   template <>
   struct geometry_concept<long double> { typedef coordinate_concept type; };
 
-#ifndef BOOST_POLYGON_NO_DEPS
-  struct gtl_no : mpl::bool_<false> {};
-  struct gtl_yes : mpl::bool_<true> {};
-  template <typename T, typename T2>
-  struct gtl_and : mpl::and_<T, T2> {};
-  template <typename T, typename T2, typename T3>
-  struct gtl_and_3 : mpl::and_<T, T2, T3> {};
-  template <typename T, typename T2, typename T3, typename T4>
-  struct gtl_and_4 : mpl::and_<T, T2, T3, T4> {};
-//  template <typename T, typename T2>
-//  struct gtl_or : mpl::or_<T, T2> {};
-//  template <typename T, typename T2, typename T3>
-//  struct gtl_or_3 : mpl::or_<T, T2, T3> {};
-//  template <typename T, typename T2, typename T3, typename T4>
-//  struct gtl_or_4 : mpl::or_<T, T2, T3, T4> {};
-#else
   struct gtl_no { static const bool value = false; };
   struct gtl_yes { typedef gtl_yes type;
     static const bool value = true; };
@@ -300,7 +230,6 @@ namespace boost { namespace polygon{
   template <typename T, typename T2, typename T3, typename T4>
   struct gtl_and_4 { typedef typename gtl_and_3<
                        T, T2, typename gtl_and<T3, T4>::type>::type type; };
-#endif
   template <typename T, typename T2>
   struct gtl_or { typedef gtl_yes type; };
   template <typename T>
@@ -348,6 +277,18 @@ namespace boost { namespace polygon{
   struct area_type_by_domain<manhattan_domain, coordinate_type> {
     typedef typename coordinate_traits<coordinate_type>::manhattan_area_type type; };
 
+  template<bool E, class R = void>
+  struct enable_if_ {
+      typedef R type;
+  };
+
+  template<class R>
+  struct enable_if_<false, R> { };
+
+  template<class E, class R = void>
+  struct enable_if
+      : enable_if_<E::value, R> { };
+
   struct y_c_edist : gtl_yes {};
 
   template <typename coordinate_type_1, typename coordinate_type_2>