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

View File

@@ -13,6 +13,7 @@
#include <cstddef>
#include <boost/container/detail/mpl.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/adl_move_swap.hpp>
#include <memory>
using namespace boost::container;
@@ -475,8 +476,8 @@ int main()
{
Scoped0Inner s0i2;
Scoped1Inner s1i2;
boost::container::swap_dispatch(s0i, s0i2);
boost::container::swap_dispatch(s1i, s1i2);
boost::adl_move_swap(s0i, s0i2);
boost::adl_move_swap(s1i, s1i2);
}
}