]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/move/algo/detail/pdqsort.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / move / algo / detail / pdqsort.hpp
index b6a127896c9799bcea61650f0054c08f4e5dc69e..640f8a3d1bcae6947b2ac5ec1a1dd3f53cd6f56e 100644 (file)
@@ -47,6 +47,7 @@
 #endif
 
 #include <boost/move/detail/config_begin.hpp>
+
 #include <boost/move/detail/workaround.hpp>
 #include <boost/move/utility_core.hpp>
 #include <boost/move/algo/detail/insertion_sort.hpp>
 #include <boost/move/adl_move_swap.hpp>
 #include <cstddef>
 
+#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 40600))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#endif
+
 namespace boost {
 namespace movelib {
 
@@ -109,7 +115,7 @@ namespace pdqsort_detail {
     template<class Iter, class Compare>
     inline bool partial_insertion_sort(Iter begin, Iter end, Compare comp) {
         typedef typename boost::movelib::iterator_traits<Iter>::value_type T;
-        typedef typename boost::movelib::iterator_traits<Iter>::size_type  size_type;
+        typedef typename boost::movelib:: iter_size<Iter>::type  size_type;
         if (begin == end) return true;
         
         size_type limit = 0;
@@ -225,10 +231,10 @@ namespace pdqsort_detail {
 
    template<class Iter, class Compare>
    void pdqsort_loop( Iter begin, Iter end, Compare comp
-                    , typename boost::movelib::iterator_traits<Iter>::size_type bad_allowed
+                    , typename boost::movelib:: iter_size<Iter>::type bad_allowed
                     , bool leftmost = true)
    {
-        typedef typename boost::movelib::iterator_traits<Iter>::size_type size_type;
+        typedef typename boost::movelib:: iter_size<Iter>::type size_type;
 
         // Use a while loop for tail recursion elimination.
         while (true) {
@@ -322,13 +328,17 @@ template<class Iter, class Compare>
 void pdqsort(Iter begin, Iter end, Compare comp)
 {
    if (begin == end) return;
-   typedef typename boost::movelib::iterator_traits<Iter>::size_type size_type;
+   typedef typename boost::movelib:: iter_size<Iter>::type size_type;
    pdqsort_detail::pdqsort_loop<Iter, Compare>(begin, end, comp, pdqsort_detail::log2(size_type(end - begin)));
 }
 
 }  //namespace movelib {
 }  //namespace boost {
 
+#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 40600))
+#pragma GCC diagnostic pop
+#endif
+
 #include <boost/move/detail/config_end.hpp>
 
 #endif   //BOOST_MOVE_ALGO_PDQSORT_HPP