]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/detail/binary_search.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / detail / binary_search.hpp
index 3dca9b65092954a3b02d4f64032d8a08b72c6881..0591563673e0a845a603ac9913a74f67951f8bf6 100644 (file)
@@ -1,11 +1,11 @@
-// Copyright (c)  2000 David Abrahams. 
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
+// Copyright (c)  2000 David Abrahams.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
-// 
+//
 // Copyright (c) 1994
 // Hewlett-Packard Company
-// 
+//
 // Permission to use, copy, modify, distribute and sell this software
 // and its documentation for any purpose is hereby granted without fee,
 // provided that the above copyright notice appear in all copies and
 // in supporting documentation.  Hewlett-Packard Company makes no
 // representations about the suitability of this software for any
 // purpose.  It is provided "as is" without express or implied warranty.
-// 
+//
 // Copyright (c) 1996
 // Silicon Graphics Computer Systems, Inc.
-// 
+//
 // Permission to use, copy, modify, distribute and sell this software
 // and its documentation for any purpose is hereby granted without fee,
 // provided that the above copyright notice appear in all copies and
 // in supporting documentation.  Silicon Graphics makes no
 // representations about the suitability of this software for any
 // purpose.  It is provided "as is" without express or implied warranty.
-// 
+//
 #ifndef BINARY_SEARCH_DWA_122600_H_
 # define BINARY_SEARCH_DWA_122600_H_
 
-# include <boost/detail/iterator.hpp>
 # include <utility>
+# include <iterator>
 
 namespace boost { namespace detail {
 
 template <class ForwardIter, class Tp>
 ForwardIter lower_bound(ForwardIter first, ForwardIter last,
-                             const Tp& val) 
+                             const Tp& val)
 {
-    typedef detail::iterator_traits<ForwardIter> traits;
-    
-    typename traits::difference_type len = boost::detail::distance(first, last);
+    typedef std::iterator_traits<ForwardIter> traits;
+
+    typename traits::difference_type len = std::distance(first, last);
     typename traits::difference_type half;
     ForwardIter middle;
 
@@ -62,9 +62,9 @@ template <class ForwardIter, class Tp, class Compare>
 ForwardIter lower_bound(ForwardIter first, ForwardIter last,
                               const Tp& val, Compare comp)
 {
-  typedef detail::iterator_traits<ForwardIter> traits;
+  typedef std::iterator_traits<ForwardIter> traits;
 
-  typename traits::difference_type len = boost::detail::distance(first, last);
+  typename traits::difference_type len = std::distance(first, last);
   typename traits::difference_type half;
   ForwardIter middle;
 
@@ -87,9 +87,9 @@ template <class ForwardIter, class Tp>
 ForwardIter upper_bound(ForwardIter first, ForwardIter last,
                            const Tp& val)
 {
-  typedef detail::iterator_traits<ForwardIter> traits;
+  typedef std::iterator_traits<ForwardIter> traits;
 
-  typename traits::difference_type len = boost::detail::distance(first, last);
+  typename traits::difference_type len = std::distance(first, last);
   typename traits::difference_type half;
   ForwardIter middle;
 
@@ -112,9 +112,9 @@ template <class ForwardIter, class Tp, class Compare>
 ForwardIter upper_bound(ForwardIter first, ForwardIter last,
                            const Tp& val, Compare comp)
 {
-  typedef detail::iterator_traits<ForwardIter> traits;
+  typedef std::iterator_traits<ForwardIter> traits;
 
-  typename traits::difference_type len = boost::detail::distance(first, last);
+  typename traits::difference_type len = std::distance(first, last);
   typename traits::difference_type half;
   ForwardIter middle;
 
@@ -137,9 +137,9 @@ template <class ForwardIter, class Tp>
 std::pair<ForwardIter, ForwardIter>
 equal_range(ForwardIter first, ForwardIter last, const Tp& val)
 {
-  typedef detail::iterator_traits<ForwardIter> traits;
+  typedef std::iterator_traits<ForwardIter> traits;
 
-  typename traits::difference_type len = boost::detail::distance(first, last);
+  typename traits::difference_type len = std::distance(first, last);
   typename traits::difference_type half;
   ForwardIter middle, left, right;
 
@@ -169,9 +169,9 @@ std::pair<ForwardIter, ForwardIter>
 equal_range(ForwardIter first, ForwardIter last, const Tp& val,
               Compare comp)
 {
-  typedef detail::iterator_traits<ForwardIter> traits;
+  typedef std::iterator_traits<ForwardIter> traits;
 
-  typename traits::difference_type len = boost::detail::distance(first, last);
+  typename traits::difference_type len = std::distance(first, last);
   typename traits::difference_type half;
   ForwardIter middle, left, right;
 
@@ -194,7 +194,7 @@ equal_range(ForwardIter first, ForwardIter last, const Tp& val,
     }
   }
   return std::pair<ForwardIter, ForwardIter>(first, first);
-}           
+}
 
 template <class ForwardIter, class Tp>
 bool binary_search(ForwardIter first, ForwardIter last,