From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-02-15 15:18:50


Bruno Martínez Aguerre wrote:
>
> Why not:
>
> optional& operator=(optional rhs)
> {
> optional_swap(*this, rhs);
> return *this;
> }
> ?

Because this encodes an implementation detail (that copy+swap is being used)
in the signature of operator=.