Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-03-08 05:08:32


Jan Gaspar <jano_gaspar_at_[hidden]> writes:

> Now if there will be the assignment idiom
> applied the front-most will be assigned to the new one
> - it will be not destroyed (no destructor will be
> called). IMHO this is not correct. The old element
> will not disappear - just its value/state will be
> different. I think that the overwrite operation means
> destruction of the old object, NOT assignment. What do
> you think?

I think it introduces inefficiencies that most people won't want to
pay for, and I don't see any benefits other than lifting the
requirement on assignability. Types that are copiable but not
assignable are rare, though, at least in my experience.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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