~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/first/rvalueref.yo

  • Committer: Package Import Robot
  • Author(s): Frank B. Brokken
  • Date: 2012-01-20 11:53:17 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20120120115317-v4wiq9sttx72fabk
Tags: 9.1.0-1
New upstream release (covering C++11 to a large extend)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
In bf(C++), temporary (rvalue) values are indistinguishable from
2
 
tt(const &) types. the C++0x standard adds a new reference type called an
 
2
tt(const &) types. the C++11 standard adds a new reference type called an
3
3
    emi(rvalue reference), defined as
4
4
    ti(typename &&).
5
5
 
17
17
anonymous variable has no name and this is the distinguishing feature for the
18
18
compiler to associate it automatically with an lvalue reference if it has a
19
19
choice. Before introducing some interesting and new constructions
20
 
that weren't available before C++0x let's first have a look at some
 
20
that weren't available before C++11 let's first have a look at some
21
21
distinguishing applications of lvalue references. The following function
22
22
returns a temporary (anonymous) value:
23
23
        verb(