Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Value category, lvalue, rvalue?

Ook bekend als: value category · lvalue · rvalue

Definition 2.6 University Computer Science — Year 2 · Hoofdstuk 2 — Copying, Moving and Smart Pointers

Every expression has a value category. An lvalue names an object that outlives the expression: a variable a, *p, v[i]. A prvalue computes a value that no name holds yet: 42, x + y, a call f() returning by value, Buffer("Quay"). An xvalue names an object whose resources may be taken, such as std::move(a). Prvalues and xvalues together are the rvalues.

Lees in het hoofdstuk →