$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [core] A better boost::swap
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-12-26 06:05:20
Hi all,
Ion Gaztañaga implemented a very good swap that used move emulation when
possible and has all the features of boost::swap:
http://www.boost.org/doc/libs/develop/boost/move/adl_move_swap.hpp
I've tried to change default implementation of ::boost::swap to
#include <boost/move/adl_move_swap.hpp>
namespace boost
{
template<class T1, class T2>
BOOST_GPU_ENABLED
void swap(T1& left, T2& right)
{
::boost::adl_move_swap(left, right);
}
}
All the tests of the Boost.Swap passed. Ion's solution looks better than
existing boost::swap.
Are there any reasons not to change the existing implementation of
Boost.Swap to Ion's version?
-- Best regards, Antony Polukhin