
27 Apr
2010
27 Apr
'10
5:24 p.m.
Ion GaztaƱaga wrote:
On 26/04/2010 21:19, Stephan T. Lavavej wrote:
Because rrv1 created temporaries when casting lvalues to rvalues
Yes, I think I should have two move implementations, because for GCC 4.3 casting to rvalue reference also creates a temporary, just like with Beta MSVC-10 (rrv1).
For both latest GCC and MSVC I think std::forward implementation #5 from N2951 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2951.html) should work correctly.
Thanks again,
Ion
Except that VC10 does not implement function template default arguments, so you will have to tweak it somewhat. :-( Bo Persson