[patch] : Adding move symantics to vector

Paolo Carlini pcarlini@suse.de
Thu Sep 8 23:57:00 GMT 2005


chris jefferson wrote:

>Yes, sorry, I should have been clearer :)
>
>the problem is when we actually apply moving, clearly we need a
>non-const reference to the thing we are moving from, as we intend to
>change it. When not moving we can use a const &.
>  
>
Exactly.

>I have three ways to solve this, all are fine in my opinion. While I
>personally like enable_if, I think (2) is probably the least exciting
>option, and therefore most likely to work.
>  
>
Indeed, makes sense and appear to work here. Please investigate this
solution and test it, if it works, there is no need to involve
__enable_if. Remember to add a big comment in moveable.h encouraging
someone else to pursue option 1 ;)

(indeed, in my mind I was considering the very same kinds of options).

Paolo.

P.S. Now I see that the work in your last patch is not directly affected
by this issue and I can continue my final testing: everything is going
well, for now.



More information about the Libstdc++ mailing list