diff options
Diffstat (limited to 'boost/interprocess/allocators/private_node_allocator.hpp')
-rw-r--r-- | boost/interprocess/allocators/private_node_allocator.hpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/boost/interprocess/allocators/private_node_allocator.hpp b/boost/interprocess/allocators/private_node_allocator.hpp index 8b546c3354..24fb84c156 100644 --- a/boost/interprocess/allocators/private_node_allocator.hpp +++ b/boost/interprocess/allocators/private_node_allocator.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP #define BOOST_INTERPROCESS_PRIVATE_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 @@ -24,12 +28,12 @@ #include <boost/assert.hpp> #include <boost/utility/addressof.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/detail/utilities.hpp> #include <boost/interprocess/detail/workaround.hpp> -#include <memory> -#include <algorithm> +#include <boost/move/adl_move_swap.hpp> #include <cstddef> //!\file @@ -160,7 +164,7 @@ class private_node_allocator_base //!Swaps allocators. Does not throw. If each allocator is placed in a //!different shared memory segments, the result is undefined. friend void swap(self_t &alloc1,self_t &alloc2) - { alloc1.m_node_pool.swap(alloc2.m_node_pool); } + { boost::adl_move_swap(alloc1.m_node_pool, alloc2.m_node_pool); } #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: @@ -365,11 +369,8 @@ class private_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, |