What is the right value of the reference value with the left what is the difference?

purpose

1, when two objects interactive eliminate unnecessary copying, saving resources, improving efficiency;

2, the definition of simple generic function;

Left and right values ​​of the concept:

Left value: to take the address, or named objects, persistent objects that still exist after the end of the expression;

Right value: You can not take the address, anonymous objects, temporary objects after the end of an expression that no longer exists;

the difference:

Left value can address, not the right value;

Value can be assigned left and right values ​​can not;

Left value of the variable, not the value of the right (only applicable basic types, user-defined types may be changed by the reference value of the right member function);

Guess you like

Origin www.cnblogs.com/pacino12134/p/11259012.html