The name of an object or function in scope, regardless of type, such as std::cin or std::endl. Even if the object's type is rvalue reference, the expression consisting of its name is an lvalue expression.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

An xvalue is an expression that identifies an "expiring" object, that is, the object that may be moved from. The object identified by an xvalue expression may be a nameless temporary, it may be a named object in scope, or any other kind of object, but if used as a function argument, xvalue will always bind to the rvalue reference overload if available.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

Apenas as seguintes expressões são XValues:

Original:

Only the following expressions are xvalues:

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

When used as a function argument and when two overloads of the function are available, one taking rvalue reference parameter and the other taking lvalue reference to const parameter, rvalues bind to the rvalue reference overload (thus, if both copy and move constructors are available, rvalue arguments invoke the mover construtor, and likewise with copy and move assignment operators).

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

The expressions obj.*mfp and ptr->*mfp where mfp is a pointer to member function, are classified as prvalue expressions, but they cannot be used to initialize references, as function arguments, or for any purpose at all, except as the left-hand argument of a function call expression, e.g. (pobj->*ptr)(args).

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

Function call expressions returning void, cast expressions to void, and throw-expressions are classified as prvalue expressions, but they cannot be used to initialize references or as function arguments. They can be used in a discarded-value context (e.g. on a line of its own, as the left argument of the comma operator, etc) and in the return statement in a function returning void. In addition, throw-expressions (but not other void prvalues) may be used as the second and the third operands of the operador condicional?:.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.