diff options
Diffstat (limited to 'boost/interprocess/allocators/node_allocator.hpp')
-rw-r--r-- | boost/interprocess/allocators/node_allocator.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/boost/interprocess/allocators/node_allocator.hpp b/boost/interprocess/allocators/node_allocator.hpp index af522f35b2..8bd6dfe2c3 100644 --- a/boost/interprocess/allocators/node_allocator.hpp +++ b/boost/interprocess/allocators/node_allocator.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_NODE_ALLOCATOR_HPP #define BOOST_INTERPROCESS_NODE_ALLOCATOR_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif @@ -26,11 +30,11 @@ #include <boost/interprocess/detail/utilities.hpp> #include <boost/interprocess/detail/type_traits.hpp> #include <boost/interprocess/allocators/detail/node_pool.hpp> +#include <boost/interprocess/containers/version_type.hpp> #include <boost/container/detail/multiallocation_chain.hpp> #include <boost/interprocess/exceptions.hpp> #include <boost/interprocess/allocators/detail/allocator_common.hpp> -#include <memory> -#include <algorithm> +#include <boost/move/adl_move_swap.hpp> #include <cstddef> //!\file @@ -144,7 +148,7 @@ class node_allocator_base node_allocator_base& operator=(const node_allocator_base &other) { node_allocator_base c(other); - swap(*this, c); + boost::adl_move_swap(*this, c); return *this; } @@ -166,7 +170,7 @@ class node_allocator_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: @@ -373,11 +377,8 @@ class node_allocator //!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, |