diff options
Diffstat (limited to 'boost/interprocess/allocators/adaptive_pool.hpp')
-rw-r--r-- | boost/interprocess/allocators/adaptive_pool.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/boost/interprocess/allocators/adaptive_pool.hpp b/boost/interprocess/allocators/adaptive_pool.hpp index d21fe1eda4..3c0d50f5ec 100644 --- a/boost/interprocess/allocators/adaptive_pool.hpp +++ b/boost/interprocess/allocators/adaptive_pool.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_ADAPTIVE_POOL_HPP #define BOOST_INTERPROCESS_ADAPTIVE_POOL_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif @@ -26,12 +30,12 @@ #include <boost/interprocess/detail/utilities.hpp> #include <boost/interprocess/detail/type_traits.hpp> #include <boost/interprocess/allocators/detail/adaptive_node_pool.hpp> +#include <boost/interprocess/containers/version_type.hpp> #include <boost/interprocess/exceptions.hpp> #include <boost/interprocess/allocators/detail/allocator_common.hpp> #include <boost/container/detail/multiallocation_chain.hpp> #include <boost/interprocess/detail/mpl.hpp> -#include <memory> -#include <algorithm> +#include <boost/move/adl_move_swap.hpp> #include <cstddef> //!\file @@ -137,7 +141,7 @@ class adaptive_pool_base adaptive_pool_base& operator=(const adaptive_pool_base &other) { adaptive_pool_base c(other); - swap(*this, c); + boost::adl_move_swap(*this, c); return *this; } @@ -167,7 +171,7 @@ class adaptive_pool_base //!Swaps allocators. Does not throw. If each allocator is placed in a //!different memory segment, the result is undefined. friend void swap(self_t &alloc1, self_t &alloc2) - { ipcdetail::do_swap(alloc1.mp_node_pool, alloc2.mp_node_pool); } + { boost::adl_move_swap(alloc1.mp_node_pool, alloc2.mp_node_pool); } #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: @@ -388,11 +392,8 @@ class adaptive_pool //!allocate, allocation_command and allocate_many. size_type size(const pointer &p) const; - std::pair<pointer, bool> - allocation_command(boost::interprocess::allocation_type command, - size_type limit_size, - size_type preferred_size, - size_type &received_size, const pointer &reuse = 0); + pointer allocation_command(boost::interprocess::allocation_type command, + size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse); //!Allocates many elements of size elem_size in a contiguous block //!of memory. The minimum number to be allocated is min_elements, |