On 26 February 2012 03:21, Serge Pavlovsky wrote:
> hi
> in <functional>
> function&
> operator=(function&& __x)
> {
> function(std::move(__x)).swap(*this);
> return *this;
> }
> why not just __x.swap(*this); ?
>
That would not destroy the current contents of *this immediately.