
29 Apr
2010
29 Apr
'10
6:35 p.m.
Jeffrey Hellrung: ...
I'm confused. So static_cast< Arg&& >(r) creates a new temporary object (rather than just a (rvalue) reference to the r object) when used in direct construction, but does not behave this way otherwise (e.g., the line after "//Correct binding" above? ... Maybe I don't know rvalue references as well as I had thought... :/
I don't think that casting a T (rvalue or lvalue) to T&& was ever supposed to create a temporary; it's always a direct reference binding. This is not a rrv1 vs rrv2 issue; it looks like a plain compiler bug.