glvalue
suggest changeA 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents