2014-12-26 12:05 GMT+01:00 Antony Polukhin
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
namespace boost { template 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
You may find it a silly argument, and it goes back to these dependency graph discussions. If you look at the dependency report, like this one http://www.pdimov.com/tmp/report-d5ca5be/module-levels.html It says Boost.Core is level 2 (so, fairly primitive) while Boost.Move is Level 6. If you make Core depend on Move, it is not that primitive anymore. Of course, the idea with improving swap is sound. I just thought I would bring it up. Regards, &rzej