17 Sep
2020
17 Sep
'20
9:34 p.m.
On Thu, Sep 17, 2020 at 2:03 PM Peter Dimov via Boost
T& operator=( T const& rhs ) { T(rhs).swap(*this); return *this; }
The memory_resource associated with a value can never change after construction, so the above would have to be written as: T& operator=( T const& rhs ) { T( rhs, this->storage() ).swap( *this ); return *this; } and T& operator=( T const& rhs ) { T( std::move(rhs), this->storage() ).swap( *this ); return *this; } Which I think is ok... Thanks