
on Fri Jun 15 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
On 15/06/2012 15:59, Sebastian Redl wrote:
Assume T is std::array<E, 32>, where E isn't movable and its copy constructor/assignment might throw. std::array's assignment operator gives only the basic guarantee. So if an exception occurred in the assignment operator, you know that the vector is array, but you don't know anything about its contents. It might be a wild mixture of what was in it before the assignment and the elements returned from bar.
Some operator= implementation do not provide the strong guarantee, but that's not the case of most objects.
Most people don't know what "most objects" are like :-)
It doesn't seem a good idea to introduce a new function overloading mechanism to drop that would always void this guarantee.
I don't understand this sentence. -- Dave Abrahams BoostPro Computing http://www.boostpro.com