]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/multi_index/detail/rnd_index_node.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / multi_index / detail / rnd_index_node.hpp
index ad61ea25ddada0f34a75efbfc2a557af704318d9..72d93846a002176c3ad9d2759e204c22aa738744 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2015 Joaquin M Lopez Munoz.
+/* Copyright 2003-2018 Joaquin M Lopez Munoz.
  * 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)
@@ -20,6 +20,7 @@
 #include <boost/multi_index/detail/raw_ptr.hpp>
 #include <cstddef>
 #include <functional>
+#include <memory>
 
 namespace boost{
 
@@ -33,16 +34,25 @@ struct random_access_index_node_impl
   typedef typename
   boost::detail::allocator::rebind_to<
     Allocator,random_access_index_node_impl
-  >::type::pointer                          pointer;
-  typedef typename
-  boost::detail::allocator::rebind_to<
-    Allocator,random_access_index_node_impl
-  >::type::const_pointer                    const_pointer;
+  >::type                                        node_allocator;
+#ifdef BOOST_NO_CXX11_ALLOCATOR
+  typedef typename node_allocator::pointer       pointer;
+  typedef typename node_allocator::const_pointer const_pointer;
+#else
+  typedef std::allocator_traits<node_allocator>  node_traits;
+  typedef typename node_traits::pointer          pointer;
+  typedef typename node_traits::const_pointer    const_pointer;
+#endif
   typedef typename
   boost::detail::allocator::rebind_to<
     Allocator,pointer
-  >::type::pointer                          ptr_pointer;
-
+  >::type                                        ptr_allocator;
+#ifdef BOOST_NO_CXX11_ALLOCATOR
+  typedef typename ptr_allocator::pointer        ptr_pointer;
+#else
+  typedef std::allocator_traits<ptr_allocator>   ptr_traits;
+  typedef typename ptr_traits::pointer           ptr_pointer;
+#endif
   ptr_pointer& up(){return up_;}
   ptr_pointer  up()const{return up_;}