]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/util/range.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / util / range.hpp
index e6acb1816a4c009d06334c05967de64cdae3e11c..1abf617aa3c9af9fa84738db4a7370a97b8fbd12 100644 (file)
@@ -2,8 +2,8 @@
 
 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
-// This file was modified by Oracle on 2013, 2014, 2015, 2016, 2019.
-// Modifications copyright (c) 2013-2019 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
 
 
 #include <algorithm>
 #include <iterator>
+#include <type_traits>
 
 #include <boost/concept_check.hpp>
 #include <boost/config.hpp>
 #include <boost/core/addressof.hpp>
+#include <boost/mpl/has_xxx.hpp>
 #include <boost/range/concepts.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 #include <boost/range/empty.hpp>
 #include <boost/range/difference_type.hpp>
+#include <boost/range/has_range_iterator.hpp>
 #include <boost/range/iterator.hpp>
 #include <boost/range/rbegin.hpp>
 #include <boost/range/reference.hpp>
 #include <boost/range/size.hpp>
 #include <boost/range/value_type.hpp>
-#include <boost/type_traits/is_convertible.hpp>
 
 #include <boost/geometry/core/assert.hpp>
 #include <boost/geometry/core/mutable_range.hpp>
 
-namespace boost { namespace geometry { namespace range {
+namespace boost { namespace geometry { namespace range
+{
+
+namespace detail
+{
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category)
+
+template <typename T>
+struct is_iterator
+    : std::integral_constant
+        <
+            bool,
+            has_iterator_category
+                <
+                    std::iterator_traits<T>
+                >::value
+        >
+{};
+
+
+template <typename T, bool HasIterator = boost::has_range_iterator<T>::value>
+struct is_range_impl
+    : is_iterator
+        <
+            typename boost::range_iterator<T>::type
+        >
+{};
+template <typename T>
+struct is_range_impl<T, false>
+    : std::false_type
+{};
+
+template <typename T>
+struct is_range
+    : is_range_impl<T>
+{};
 
-namespace detail {
 
 // NOTE: For SinglePassRanges pos could iterate over all elements until the i-th element was met.
 
@@ -217,7 +254,7 @@ namespace detail {
 
 template <typename It,
           typename OutIt,
-          bool UseMove = boost::is_convertible
+          bool UseMove = std::is_convertible
                             <
                                 typename std::iterator_traits<It>::value_type &&,
                                 typename std::iterator_traits<OutIt>::value_type