Added adl_move_swap utility

This commit is contained in:
Ion Gaztañaga committed 2014-11-26 19:27:40 +01:00
1 parent ad50fba54f
commit cbda10ecdd
5 files changed
+95 -12

No files matched your search

+3 -3
View File
@@ -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());
}
};