glvalue

suggest change

A glvalue (a “generalized lvalue”) is an lvalue or an xvalue. Those expressions designate an object or a function. A prvalue does not. An lvalue is not, by itself, an xvalue; std::move turns an lvalue into an xvalue that refers to the same object.

struct X { int n; };
X foo();

X x;
x;            // lvalue
std::move(x); // xvalue: the result of the cast, not the name x

foo(); // prvalue
X{};   // prvalue
X{}.n; // xvalue: non-static member of an rvalue

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents