Use boost::adl_move_swap instead of custom swap or std::swap for performance and compatibility reasons.

This commit is contained in:
Ion Gaztañaga
2014-11-28 15:41:44 +01:00
parent afd1c2d266
commit 32418cab5f
11 changed files with 39 additions and 81 deletions
+2 -1
View File
@@ -30,6 +30,7 @@
#include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/iterator.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/adl_move_swap.hpp>
#include <boost/static_assert.hpp>
#include <boost/functional/hash.hpp>
#include <boost/intrusive/pointer_traits.hpp>
@@ -433,7 +434,7 @@ class basic_string_base
this->members_.m_repr.short_repr() = short_backup;
}
else{
boost::container::swap_dispatch(this->members_.m_repr.long_repr(), other.members_.m_repr.long_repr());
boost::adl_move_swap(this->members_.m_repr.long_repr(), other.members_.m_repr.long_repr());
}
}
}