Boost logo

Boost :

Subject: Re: [boost] [core] A better boost::swap
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-12-29 05:34:31

On Monday 29 December 2014 05:22:29 Rob Stewart wrote:
> On December 28, 2014 1:42:54 PM EST, Pete Bartlett <pete_at_[hidden]>
> >>I'm sure Antony meant to change the implementation to match the ideas
> >
> >in Ion's code, not use the test implementation he showed.
> >
> >But isn't the whole idea to depend on Boost.Move so that swap can
> >benefit
> >from move emulation?
> >As Peter said, a new Boost.Swap could depend on Move, but Core should
> >not.
> It could be implemented based upon C++11 move semantics, when available. If
> there were a way to detect and use Boost.Move without requiring a reference
> to it, that would be ideal, of course.

The whole idea of using Boost.Move swap is to make use of move emulation in
C++03. std::swap in C++11 already uses move constructors, so Boost.Core swap
automatically uses move constructors through std::swap.

Boost list run by bdawes at, gregod at, cpdaniel at, john at