Boost logo

Boost :

Subject: Re: [boost] Improving the assignment operators of various Boosttypes
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2008-09-11 10:07:56


David Abrahams a écrit :
> self& operator=(self x) { swap(*this,x); return *this; }
>
> with the rationale given in
> http://groups.google.com/group/comp.lang.c++.moderated/msg/5e6014446d559b63
> (I suspect Andrei's CUJ article is equally good or better but much
> longer)
>
> ...but I would think given the thread mentioned above that answer would
> be self-evident, so it makes me wonder if you're trying to ask something
> else
Sorry if i was unclear. My question was is the old operator= form still
needed soemtime , thus making the 2 forms of the operator to be taught.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk