forked from boostorg/move
Added adl_move_swap utility
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <boost/move/detail/unique_ptr_meta_utils.hpp>
|
||||
#include <boost/move/default_delete.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/adl_move_swap.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
@@ -727,9 +728,8 @@ class unique_ptr
|
||||
//! <b>Effects</b>: Invokes swap on the stored pointers and on the stored deleters of *this and u.
|
||||
void swap(unique_ptr& u) BOOST_NOEXCEPT
|
||||
{
|
||||
using ::boost::move_detail::swap;
|
||||
swap(m_data.m_p, u.m_data.m_p);
|
||||
swap(m_data.deleter(), u.m_data.deleter());
|
||||
::boost::adl_move_swap(m_data.m_p, u.m_data.m_p);
|
||||
::boost::adl_move_swap(m_data.deleter(), u.m_data.deleter());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user