R-value: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
added c++ programming
FrescoBot (talk | contribs)
m Bot: link syntax and minor changes
Line 9: Line 9:
* In solid mechanics, the [[Lankford coefficient]]
* In solid mechanics, the [[Lankford coefficient]]


== Programming ==
== Programming ==


=== [http://en.wikipedia.org/wiki/C++11 C++0x] Move Semantics ===
=== [[C++11|C++0x]] Move Semantics ===
rvalues denote temporary objects which are destroyed at the next semicolon (to be more precise: at the end of the full-expression that lexically contains the rvalue)<syntaxhighlight lang="cpp">
rvalues denote temporary objects which are destroyed at the next semicolon (to be more precise: at the end of the full-expression that lexically contains the rvalue)<syntaxhighlight lang="cpp">
//examble:
//examble:

Revision as of 20:15, 29 January 2018

R-value or rvalue may refer to:

  • In computer science, a value considered independently of its storage location
  • In computer science, a data value of a variable stored at some location in memory
  • R-value (insulation) in building engineering, the efficiency of insulation of a house
  • R-value (soils) in geotechnical engineering, the stability of soils and aggregates for pavement construction
  • R-factor (crystallography), a measure of the agreement between the crystallographic model and the diffraction data
  • In statistics, the Pearson product-moment correlation coefficient, or simply correlation coefficient
  • In ophthalmic optics, the distance between the segment optical center and the segment top
  • In solid mechanics, the Lankford coefficient

Programming

C++0x Move Semantics

rvalues denote temporary objects which are destroyed at the next semicolon (to be more precise: at the end of the full-expression that lexically contains the rvalue)

//examble:
class Object {};

Object a;
Object b;
Object c;

c = a + b;

in above sample "a" and "b" are stored automatically in invisible object called "rvalue". below we try to show it:

Object a;
Object b;
Object c;
{ //start brace
    Object rvalue = a.operator+( b );
    c = rvalue;
} //end brace removes rvalue

See also