In C++03 you can use the const& trick (or “most important const”) to extend the lifetime of a temporary to the lifetime of the reference. My question is, in C++0x, does this behaviour extend to rvalue references? I.e auto&& x = someFunction();
In C++03 you can use the const& trick (or most important const) to extend
Share
According to
[class.temporary], if that compiles then yes, the lifetime of the temporary is extended.