
11 Sep
2008
11 Sep
'08
2:07 p.m.
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.