Definitions
from Wiktionary, Creative Commons Attribution/Share-Alike License.
- noun computing, programming Any value that is not an
lvalue .
Etymologies
from Wiktionary, Creative Commons Attribution/Share-Alike License
Support
Help support Wordnik (and make this page ad-free) by adopting the word rvalue.
Examples
-
The rvalue references v2.0 rules looked at this and said, push_backconst string& is the only viable overload.
Site Home vcblog 2011
-
It was superseded by rvalue references v.push_back"meow".
Site Home vcblog 2011
-
This week we'll look at rvalue references, a Visual C++ language feature that can help you to further improve the performance of your applications that use the Concurrency Runtime.
Site Home Thomas Petchel [MSFT] 2011
-
To summarize, rvalue references can help you improve memory performance by minimizing the number of memory allocation, deallocation, and copy operations.
Site Home Thomas Petchel [MSFT] 2011
-
Visual C++ 2010 introduces the concept of rvalue references which enable two things:
Site Home Thomas Petchel [MSFT] 2011
-
I won't go into the nitty-gritty of how perfect forwarding and move semantics work here; for in-depth details check out Rvalue References: C++0x Features in VC10, Part 2 on the Visual C++ Team Blog note that Stephan's article discusses an early implementation of rvalue references, the rules for which have been changed in the final version of Visual C++ 2010.
Site Home Thomas Petchel [MSFT] 2011
-
Sidebar - Stephan from the Visual C++ team clued me in to one additional benefit to using rvalue references in your parallel code: Copy construction that requires dynamic memory allocation such as
Site Home Thomas Petchel [MSFT] 2011
-
For example, the std::vector::push_back member function takes either a const reference (const T&) or an rvalue reference (T&&) to the element to be added to the container.
Site Home Thomas Petchel [MSFT] 2011
-
In this example, the parameter to push_back is an rvalue reference because it is a temporary value that does not persist beyond the expression that uses it.
Site Home Thomas Petchel [MSFT] 2011
-
When you pass an rvalue reference to a type such as wstring you get move construction for free because wstring
Site Home Thomas Petchel [MSFT] 2011
Comments
Log in or sign up to get involved in the conversation. It's quick and easy.