Boost logo

Boost :

Subject: Re: [boost] [move] auto-generated operator=
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-11-16 12:20:04

David Abrahams escribió:
> On Nov 16, 2009, at 7:46 AM, David Abrahams wrote:
m with requiring move-enablers to supply a swap.
> In fact, I don't even think we need to do that. This seems to work pretty well:
> public:\
> TYPE& operator=(TYPE t)\
> { return this->operator=(static_cast< ::boost::rv<TYPE>&>(t)); } \
> //

Interesting. This works for some types but it has performance impact in
types likevector because they can't reuse previous allocated resource
(e.g. capacity).


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