
"David Abrahams" <dave@boost-consulting.com> wrote
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.
I think you are missing the point: object pushed out of circular_buffer because container got full must be destroyed. Therefore assignement is not used, therefore no CopyConstructible requirement on T. (I'll look whether there aren't other places requiring assignement.) /Pavel