]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/range/detail/collection_traits_detail.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / range / detail / collection_traits_detail.hpp
index 15459974ef90b6368ee524868b0b6cbcf6f58594..5a3124b54a3e84c4b9e36722a1baa848a654004a 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <cstddef>
 #include <string>
+#include <utility>
+#include <iterator>
 #include <boost/type_traits/is_array.hpp>
 #include <boost/type_traits/is_pointer.hpp>
 #include <boost/type_traits/is_const.hpp>
@@ -22,7 +24,6 @@
 #include <boost/mpl/identity.hpp>
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/fold.hpp>
-#include <boost/detail/iterator.hpp>
 
 // Container traits implementation ---------------------------------------------------------
 
@@ -36,7 +37,7 @@ namespace boost {
             /*
                 Wraps std::container compliant containers
             */
-            template< typename ContainerT >     
+            template< typename ContainerT >
             struct default_container_traits
             {
                 typedef typename ContainerT::value_type value_type;
@@ -49,7 +50,7 @@ namespace boost {
                     >::type result_iterator;
                 typedef typename ContainerT::difference_type difference_type;
                 typedef typename ContainerT::size_type size_type;
-                
+
                 // static operations
                 template< typename C >
                 static size_type size( const C& c )
@@ -63,8 +64,6 @@ namespace boost {
                     return c.empty();
                 }
 
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
                 template< typename C >
                 static iterator begin( C& c )
                 {
@@ -89,22 +88,6 @@ namespace boost {
                     return c.end();
                 }
 
-#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-                template< typename C >
-                static result_iterator begin( C& c )
-                {
-                    return c.begin();
-                }
-
-                template< typename C >
-                static result_iterator end( C& c )
-                {
-                    return c.end();
-                }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING    
-
             }; 
 
             template<typename T>
@@ -138,11 +121,11 @@ namespace boost {
             {
                 typedef typename PairT::first_type element_type;
 
-                typedef typename ::boost::detail::
-                    iterator_traits<element_type>::value_type value_type;
+                typedef typename
+                    std::iterator_traits<element_type>::value_type value_type;
                 typedef std::size_t size_type;
-                typedef typename ::boost::detail::
-                    iterator_traits<element_type>::difference_type difference_type;
+                typedef typename
+                    std::iterator_traits<element_type>::difference_type difference_type;
 
                 typedef element_type iterator;
                 typedef element_type const_iterator;
@@ -204,7 +187,7 @@ namespace boost {
                 BOOST_STATIC_CONSTANT( size_type, array_size = sz );
             };
 
-            
+
             // array length resolving
             /*
                 Lenght of string contained in a static array could
@@ -261,7 +244,7 @@ namespace boost {
                         else
                             return std::char_traits<char>::length(a);
                     }
-                    
+
                     template< typename A >
                     static bool empty( const A& a )
                     {
@@ -321,7 +304,7 @@ namespace boost {
                         const_iterator,
                         iterator 
                     >::type result_iterator;
-                
+
             private:
                 // resolve array size
                 typedef typename
@@ -345,9 +328,7 @@ namespace boost {
                 {
                     return array_length_type::empty(a);
                 }
-                
 
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
                 template< typename A >
                 static iterator begin( A& a )
@@ -373,22 +354,6 @@ namespace boost {
                     return a+array_length_type::length(a);
                 }
 
-#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-                template< typename A >
-                static result_iterator begin( A& a )
-                {
-                    return a;
-                }
-
-                template< typename A >
-                static result_iterator end( A& a )
-                {
-                    return a+array_length_type::length(a);
-                }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING    
-
             }; 
 
             template<typename T>
@@ -436,8 +401,6 @@ namespace boost {
                     return p==0 || p[0]==0;
                 }
 
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
                 template< typename P >
                 static iterator begin( P& p )
                 {
@@ -468,24 +431,6 @@ namespace boost {
                         return p+char_traits::length(p);
                 }
 
-#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-                template< typename P >
-                static result_iterator begin( P& p )
-                {
-                    return p;
-                }
-
-                template< typename P >
-                static result_iterator end( P& p )
-                {
-                    if ( p==0 )
-                        return p;
-                    else
-                        return p+char_traits::length(p);
-                }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING    
             }; 
 
             template<typename T>