August 2012
Intermediate to advanced
976 pages
30h 17m
English
Note
The new standard introduced a new kind of reference: an “rvalue reference,” which we’ll cover in § 13.6.1 (p. 532). These references are primarily intended for use inside classes. Technically speaking, when we use the term reference, we mean “lvalue reference.”
A reference defines an alternative name for an object. A reference type “refers to” another type. We define a reference type by writing a declarator of the form &d, where d is the name being declared:
int ival = 1024;int &refVal = ival; // refVal refers to (is ...
Read now
Unlock full access