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 4:38 PM, Chris Jefferson wrote:

On 30/04/07, Howard Hinnant <hhinnant@apple.com> wrote:
On Apr 30, 2007, at 4:11 PM, Chris Jefferson wrote:

> Hello,
>
> I've been looking at updating the v7 branch to support "true" rvalue
> references. The code already there which implements it with a
> wrapper-hack will (purposefully) map very easily to the "true"
> semantics.


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 used to do that. My only reason for not doing that is that people who are compiling in C++03 mode might not want to gain a std::move / std::forward function which they weren't expecting...

<nod> That's a reasonable concern. I think move may be undetectable, but forward could be picked off by a macro (move can't be detected this way because of std::char_traits<charT>::move).


-Howard


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