This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Fix move assignment operators vs self assignment


On 01/09/2010 11:14 AM, Bo Persson wrote:
> I believe this might not be a serious oversight at all, but rather an
> early implementation of the resolution to Library Issue #1204.
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1204
>
> where it says:
>
> "Additionally this clarifies that move assignment operators need not
> perform the traditional if (this != &rhs) test commonly found (and
> needed) in copy assignment operators."
Gosh, thanks Bo. Something in my head was telling me that I had read
before something about that but couldn't really remember and then found
a very simple testcase which evidently didn't behave like move
assignment operators of library containers should, in general (Table 91)
(also, forward_list and the new experimental string were doing the check)

So, I guess, I will revert the thing, fix forward_list and __vstring,
and add a HUGE comment mentioning DR 1204.


Thanks,
Paolo (some work wasted yesterday but much less ashamed ;)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]