diff options
Diffstat (limited to 'boost/circular_buffer/base.hpp')
-rw-r--r-- | boost/circular_buffer/base.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/boost/circular_buffer/base.hpp b/boost/circular_buffer/base.hpp index 3efa8de145..1dec2f2136 100644 --- a/boost/circular_buffer/base.hpp +++ b/boost/circular_buffer/base.hpp @@ -30,6 +30,7 @@ #include <boost/type_traits/is_nothrow_move_assignable.hpp> #include <boost/type_traits/is_copy_constructible.hpp> #include <boost/type_traits/conditional.hpp> +#include <boost/move/adl_move_swap.hpp> #include <boost/move/move.hpp> #include <boost/utility/addressof.hpp> #include <algorithm> @@ -1399,11 +1400,11 @@ public: */ void swap(circular_buffer<T, Alloc>& cb) BOOST_NOEXCEPT { swap_allocator(cb, is_stateless<allocator_type>()); - std::swap(m_buff, cb.m_buff); - std::swap(m_end, cb.m_end); - std::swap(m_first, cb.m_first); - std::swap(m_last, cb.m_last); - std::swap(m_size, cb.m_size); + adl_move_swap(m_buff, cb.m_buff); + adl_move_swap(m_end, cb.m_end); + adl_move_swap(m_first, cb.m_first); + adl_move_swap(m_last, cb.m_last); + adl_move_swap(m_size, cb.m_size); #if BOOST_CB_ENABLE_DEBUG invalidate_all_iterators(); cb.invalidate_all_iterators(); @@ -2627,7 +2628,7 @@ private: //! Specialized method for swapping the allocator. void swap_allocator(circular_buffer<T, Alloc>& cb, const false_type&) { - std::swap(m_alloc, cb.m_alloc); + adl_move_swap(m_alloc, cb.m_alloc); } //! Specialized assign method. |