
8 Mar
2004
8 Mar
'04
10:08 a.m.
Jan Gaspar <jano_gaspar@yahoo.com> 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