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: rvalue references in libstdc++


On Apr 30, 2007, at 5:18 PM, Peter Dimov wrote:

Howard Hinnant wrote:

When faced with this same challenge in the CodeWarrior library I had
good luck with the technique outlined here:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/ n1771.html#old_move

I was going to suggest the same thing... but why the second overload of move? There is no use case where the argument is an rvalue, right?

I believe it was just me being conservative. I.e. move(rvalue) is legal in C++0X, so I was just covering my behind. ;-) And actually move(const l/rvalue) is legal too in C++0X (though not very fulfilling). I don't think I actually ever used it. But if client code did, then it would at least compile as it would in C++0X.


-Howard


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