Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I guess this document might serve as a not so short introduction : <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3055.pdf" rel="noreferrer">n3055</a></p> <p>The whole massacre began with the move semantics. Once we have expressions that can be moved and not copied, suddenly easy to grasp rules demanded distinction between expressions that can be moved, and in which direction.</p> <p>From what I guess based on the draft, the r/l value distinction stays the same, only in the context of moving things get messy. </p> <p>Are they needed? Probably not if we wish to forfeit the new features. But to allow better optimization we should probably embrace them.</p> <p><strong>Quoting <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3055.pdf" rel="noreferrer">n3055</a>:</strong></p> <ul> <li>An <strong>lvalue</strong> (so-called, historically, because lvalues could appear on the left-hand side of an assignment expression) designates a function or an object. <em>[Example: If <code>E</code> is an expression of pointer type, then <code>*E</code> is an lvalue expression referring to the object or function to which <code>E</code> points. As another example, the result of calling a function whose return type is an lvalue reference is an lvalue.]</em> </li> <li>An <strong>xvalue</strong> (an “eXpiring” value) also refers to an object, usually near the end of its lifetime (so that its resources may be moved, for example). An xvalue is the result of certain kinds of expressions involving rvalue references. <em>[Example: The result of calling a function whose return type is an rvalue reference is an xvalue.]</em></li> <li>A <strong>glvalue</strong> (“generalized” lvalue) is an <strong>lvalue</strong> or an <strong>xvalue</strong>. </li> <li>An <strong>rvalue</strong> (so-called, historically, because rvalues could appear on the right-hand side of an assignment expression) is an xvalue, a temporary object or subobject thereof, or a value that is not associated with an object. </li> <li>A <strong>prvalue</strong> (“pure” rvalue) is an rvalue that is not an xvalue. <em>[Example: The result of calling a function whose return type is not a reference is a prvalue]</em></li> </ul> <p>The document in question is a great reference for this question, because it shows the exact changes in the standard that have happened as a result of the introduction of the new nomenclature.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload