
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov Sent: Tuesday, April 17, 2007 5:59 AM To: boost@lists.boost.org Subject: Re: [boost] [shared_ptr] dangerous implementation of moveconstructor
This is the essence of the discussion. :-) I think that efficiency is more important in a move primitive than leaving the source in a predictable state, Joe argues the other way.
[Joe] Tossing in my own $.02, this Joe tends to agree somewhat with the other Joe. :) If I wanted to swap p and q, I can do that today without the move. On the other hand, if I move a value from q to p, I expect p's contents to be gone, not to be transferred to q. Now, I could see leaving q with old contents and flagged so it's destruction doesn't cause a delete or some such. I think the semantics of the English word 'move' would make it very surprising to any user to have it do a swap instead. Just my opinion. joe